Fix goroutine leaks in websocket

This commit is contained in:
SALLEYRON Julien 2018-02-08 08:24:03 +01:00 committed by Traefiker
parent 7b19cb5631
commit f07e8f58e6
2 changed files with 3 additions and 3 deletions

2
Gopkg.lock generated
View file

@ -1028,7 +1028,7 @@
"roundrobin",
"utils"
]
revision = "7e69a72707cbd367525e3c626be40c4a39454bb2"
revision = "af377749f48ff0ae9974b30ce12a816738b94558"
source = "https://github.com/containous/oxy.git"
[[projects]]

View file

@ -334,8 +334,8 @@ func (f *httpForwarder) serveWebSocket(w http.ResponseWriter, req *http.Request,
defer underlyingConn.Close()
defer targetConn.Close()
errClient := make(chan error)
errBackend := make(chan error)
errClient := make(chan error, 1)
errBackend := make(chan error, 1)
replicateWebsocketConn := func(dst, src *websocket.Conn, errc chan error) {
for {
msgType, msg, err := src.ReadMessage()