add more log output
This commit is contained in:
parent
2ddc1ef9e4
commit
c63ef3c12a
2 changed files with 2 additions and 2 deletions
|
@ -32,7 +32,7 @@ func SendPermanentBroadCastMessage() {
|
|||
// Remove unresponsive client
|
||||
client.Conn.Close()
|
||||
delete(Clients, client.Conn.LocalAddr())
|
||||
helper.Logger.Info("Client timed out", "host", client.RealIP, "clients", len(Clients))
|
||||
helper.Logger.Info("Client timed out", "lastPong", client.LastPong, "host", client.RealIP, "clients", len(Clients))
|
||||
}
|
||||
}
|
||||
<-tick.C
|
||||
|
|
|
@ -25,7 +25,7 @@ type WebsocketClient struct {
|
|||
// Sends a message to the websocket.
|
||||
// Automatically locks and unlocks the client mutex, to ensure that only one goroutine can write at a time.
|
||||
func (c *WebsocketClient) SendMessage(messageType int, data []byte) error {
|
||||
c.Conn.SetPongHandler(func(appData string) error {
|
||||
c.Conn.SetPongHandler(func(s string) error {
|
||||
c.LastPong = time.Now()
|
||||
return nil
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue