mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
proxy/httpproxy: fix httputil.RequestCanceler
This commit is contained in:
parent
0503676bde
commit
f14fd43548
@ -110,7 +110,7 @@ func (p *reverseProxy) ServeHTTP(rw http.ResponseWriter, clientreq *http.Request
|
|||||||
var requestClosed int32
|
var requestClosed int32
|
||||||
completeCh := make(chan bool, 1)
|
completeCh := make(chan bool, 1)
|
||||||
closeNotifier, ok := rw.(http.CloseNotifier)
|
closeNotifier, ok := rw.(http.CloseNotifier)
|
||||||
cancel := httputil.RequestCanceler(p.transport, proxyreq)
|
cancel := httputil.RequestCanceler(proxyreq)
|
||||||
if ok {
|
if ok {
|
||||||
closeCh := closeNotifier.CloseNotify()
|
closeCh := closeNotifier.CloseNotify()
|
||||||
go func() {
|
go func() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user