mirror of
https://github.com/caddyserver/caddy.git
synced 2025-06-06 04:34:37 +08:00
reverseproxy: Wait for both ends of websocket to close (#6175)
This commit is contained in:
@ -922,7 +922,9 @@ func (h *Handler) finalizeResponse(
|
||||
) error {
|
||||
// deal with 101 Switching Protocols responses: (WebSocket, h2c, etc)
|
||||
if res.StatusCode == http.StatusSwitchingProtocols {
|
||||
h.handleUpgradeResponse(logger, rw, req, res)
|
||||
var wg sync.WaitGroup
|
||||
h.handleUpgradeResponse(logger, &wg, rw, req, res)
|
||||
wg.Wait()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user