close connection on ws error

This commit is contained in:
Simon Vieille 2023-09-10 19:35:43 +02:00
parent d80395fd6e
commit 5e76b76c31
Signed by: deblan
GPG key ID: 579388D585F70417

View file

@ -371,6 +371,8 @@ func wsController(c echo.Context) error {
_, msg, err := ws.ReadMessage()
if err != nil {
ws.Close()
fmt.Printf("%+v\n", "Connection closed")
return err
}