Commit eaa4ff0c authored by Jeromy Johnson's avatar Jeromy Johnson

Merge pull request #2318 from rwcarlsen/fix-closenotify-panic2

fix another panic where CloseNotify was called from wrong goroutine
parents 37258a26 5367ee76
......@@ -114,9 +114,10 @@ func (i *gatewayHandler) getOrHeadHandler(w http.ResponseWriter, r *http.Request
defer cancel()
if cn, ok := w.(http.CloseNotifier); ok {
clientGone := cn.CloseNotify()
go func() {
select {
case <-cn.CloseNotify():
case <-clientGone:
case <-ctx.Done():
}
cancel()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment