skip client after closing unresponsive client

This commit is contained in:
Sebastian Mark 2024-11-20 20:41:50 +01:00
parent 18accba19a
commit 8295208a0b

View file

@ -25,6 +25,7 @@ func SendPermanentBroadCastMessage() {
if time.Now().Sub(client.LastPong) > (10 * time.Second) { if time.Now().Sub(client.LastPong) > (10 * time.Second) {
// Remove unresponsive client // Remove unresponsive client
client.Conn.Close() client.Conn.Close()
continue
} }
err := client.SendMessage(websocket.TextMessage, jsonMessage) err := client.SendMessage(websocket.TextMessage, jsonMessage)
if err != nil { if err != nil {