1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-28 15:27:43 +00:00

reject pongs for non-set-up clients

This commit is contained in:
Kane York 2017-09-15 13:19:33 -07:00
parent d254435173
commit fd357ae6f2

View file

@ -336,7 +336,9 @@ func RunSocketConnection(conn *websocket.Conn) {
conn.SetPongHandler(func(pongBody string) error {
client.Mutex.Lock()
client.pingCount = 0
if client.HelloOK { // do not accept PONGs until hello sent
client.pingCount = 0
}
client.Mutex.Unlock()
return nil
})