mirror of
https://github.com/mjl-/mox.git
synced 2024-12-26 08:23:48 +03:00
in websocket data copying code, wait for other goroutine to stop before changing the connection
found while running tests
This commit is contained in:
parent
459317097b
commit
afefadf2c0
1 changed files with 1 additions and 1 deletions
|
@ -634,10 +634,10 @@ func forwardWebsocket(h *config.WebForward, w http.ResponseWriter, r *http.Reque
|
|||
// Close connections so other goroutine stops as well.
|
||||
cconn.Close()
|
||||
beconn.Close()
|
||||
cconn = nil
|
||||
// Wait for goroutine so it has updated the logWriter.Size*Client fields before we
|
||||
// continue with logging.
|
||||
<-errc
|
||||
cconn = nil
|
||||
return true
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue