init LastPong
This commit is contained in:
parent
5f8c818118
commit
b1ddcb33e0
1 changed files with 3 additions and 2 deletions
|
@ -32,8 +32,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,
|
||||
}
|
||||
|
||||
client.Conn.SetPongHandler(func(s string) error {
|
||||
|
|
Loading…
Reference in a new issue