fix: gcConnOnError
This commit is contained in:
parent
77919b208f
commit
1802abe553
@ -46,7 +46,8 @@ func WelcomeAgents(ws *websocket.Conn, welcome WSWelcome, t string) {
|
|||||||
func gcConnOnError(ws *websocket.Conn) (err error) {
|
func gcConnOnError(ws *websocket.Conn) (err error) {
|
||||||
for index, value := range LISTENERS {
|
for index, value := range LISTENERS {
|
||||||
if value.ConnectionPS == ws || value.ConnectionRR == ws {
|
if value.ConnectionPS == ws || value.ConnectionRR == ws {
|
||||||
ws.Close()
|
value.ConnectionPS.Close()
|
||||||
|
value.ConnectionRR.Close()
|
||||||
delete(LISTENERS, index)
|
delete(LISTENERS, index)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user