diff --git a/src/ws/init.go b/src/ws/init.go index c71865a..2202a40 100644 --- a/src/ws/init.go +++ b/src/ws/init.go @@ -46,7 +46,8 @@ func WelcomeAgents(ws *websocket.Conn, welcome WSWelcome, t string) { func gcConnOnError(ws *websocket.Conn) (err error) { for index, value := range LISTENERS { if value.ConnectionPS == ws || value.ConnectionRR == ws { - ws.Close() + value.ConnectionPS.Close() + value.ConnectionRR.Close() delete(LISTENERS, index) } }