From 1802abe55329afc7c4d6eb1b2c60c8bda5d49816 Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Mon, 10 Apr 2023 16:53:53 +0200 Subject: [PATCH] fix: gcConnOnError --- src/ws/init.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) } }