Skip to content

Commit

Permalink
Merge pull request #9336 from rkd-msw/iss_9335_fix
Browse files Browse the repository at this point in the history
httpproxy: cancel requests when client closes a connection
  • Loading branch information
xiang90 committed Feb 18, 2018
2 parents b03fd4c + dfe12ed commit 0b5c660
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions proxy/httpproxy/reverse.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ func (p *reverseProxy) ServeHTTP(rw http.ResponseWriter, clientreq *http.Request
case <-closeCh:
atomic.StoreInt32(&requestClosed, 1)
plog.Printf("client %v closed request prematurely", clientreq.RemoteAddr)
cancel()
case <-completeCh:
}
}()
Expand Down

0 comments on commit 0b5c660

Please sign in to comment.