updated gcConnOnError func
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Paul 2023-12-26 16:26:17 +01:00
parent 5858b1398f
commit d7fcd209a4

View File

@ -44,10 +44,8 @@ func welcomeAgents(ws *websocket.Conn, welcome wsWelcome, t string) {
func gcConnOnError(ws *websocket.Conn) (err error) {
listeners.Range(func(index, value interface{}) bool {
if value.(*connectionInfo).ConnectionPS == ws {
if value.(*connectionInfo).ConnectionPS == ws || value.(*connectionInfo).ConnectionRR == ws {
value.(*connectionInfo).ConnectionPS.Close()
listeners.Delete(index)
} else if value.(*connectionInfo).ConnectionRR == ws {
value.(*connectionInfo).ConnectionRR.Close()
listeners.Delete(index)
}