From afefadf2c0e890f1acf0896309a1cbd163a05fdb Mon Sep 17 00:00:00 2001 From: Mechiel Lukkien Date: Sat, 24 Jun 2023 00:14:14 +0200 Subject: [PATCH] in websocket data copying code, wait for other goroutine to stop before changing the connection found while running tests --- http/webserver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http/webserver.go b/http/webserver.go index 090b385..4714e33 100644 --- a/http/webserver.go +++ b/http/webserver.go @@ -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 }