定时心跳

pull/30/head
taoshihan1991 4 years ago
parent 0c72f54977
commit 1f026583c7

@ -130,7 +130,13 @@ func sendPingToClient() {
models.UpdateVisitorStatus(uid,0) models.UpdateVisitorStatus(uid,0)
} }
} }
time.Sleep(3 * time.Second) for kefuId, kfConn := range kefuList {
err:=kfConn.WriteMessage(websocket.TextMessage,str)
if err != nil {
delete(kefuList, kefuId)
}
}
time.Sleep(5 * time.Second)
} }
}() }()

Loading…
Cancel
Save