init LastPong

This commit is contained in:
Sebastian Mark 2024-11-20 20:26:04 +01:00
parent c63ef3c12a
commit c348049209

View file

@ -31,8 +31,9 @@ func HandleConnection(w http.ResponseWriter, r *http.Request) {
// Register the new client
client := models.WebsocketClient{
Conn: ws,
RealIP: r.RemoteAddr,
Conn: ws,
LastPong: time.Now(),
RealIP: r.RemoteAddr,
}
mu.Lock()
Clients[ws.LocalAddr()] = &client