fix: gcConn

This commit is contained in:
Paul 2023-04-10 12:04:40 +02:00
parent 447f756922
commit 8b617a8f9f

View File

@ -55,6 +55,7 @@ func HandleWSRR(c echo.Context, cfg *config.Config) error {
err = websocket.Message.Send(value.ConnectionPS, msg) err = websocket.Message.Send(value.ConnectionPS, msg)
if err != nil { if err != nil {
log.Println(err) log.Println(err)
gcConn(ws)
} }
} }
} }
@ -72,6 +73,7 @@ func HandleWSRR(c echo.Context, cfg *config.Config) error {
err = websocket.Message.Send(value.ConnectionPS, msg) err = websocket.Message.Send(value.ConnectionPS, msg)
if err != nil { if err != nil {
log.Println(err) log.Println(err)
gcConn(ws)
} }
} }
log.Printf("ws: Inserted event") log.Printf("ws: Inserted event")
@ -80,14 +82,12 @@ func HandleWSRR(c echo.Context, cfg *config.Config) error {
err = websocket.Message.Send(value.ConnectionPS, msg) err = websocket.Message.Send(value.ConnectionPS, msg)
if err != nil { if err != nil {
log.Println(err) log.Println(err)
gcConn(ws)
} }
} }
default: default:
} }
gcConn(ws)
err = websocket.Message.Send(ws, "OK") err = websocket.Message.Send(ws, "OK")
if err != nil { if err != nil {
log.Println(err) log.Println(err)