init LastPong
This commit is contained in:
parent
c63ef3c12a
commit
c348049209
1 changed files with 3 additions and 2 deletions
|
@ -31,8 +31,9 @@ func HandleConnection(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
// Register the new client
|
// Register the new client
|
||||||
client := models.WebsocketClient{
|
client := models.WebsocketClient{
|
||||||
Conn: ws,
|
Conn: ws,
|
||||||
RealIP: r.RemoteAddr,
|
LastPong: time.Now(),
|
||||||
|
RealIP: r.RemoteAddr,
|
||||||
}
|
}
|
||||||
mu.Lock()
|
mu.Lock()
|
||||||
Clients[ws.LocalAddr()] = &client
|
Clients[ws.LocalAddr()] = &client
|
||||||
|
|
Loading…
Reference in a new issue