Skip to content

Commit b014338

Browse files
committed
ping send log
1 parent 9403939 commit b014338

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tcpsocket/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func (c *Client) write() {
9292
}
9393
c.Ping()[millisecond] = true
9494
}
95-
if conf.Acceptor.Logs.Heartbeat.PingSend && millisecond >= conf.Acceptor.Logs.Heartbeat.PingSendPrintDelay {
95+
if conf.Acceptor.Logs.Heartbeat.PingSend && c.Delay() >= conf.Acceptor.Logs.Heartbeat.PingSendPrintDelay {
9696
log.Println("[heartbeat][TCPSocket][ping]:", c.Id(), c.RemoteAddr(), millisecond, timeNow.Format("2006-01-02 15:04:05.999"), c.Delay())
9797
}
9898
}

websocket/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ func (c *Client) write() {
129129
}
130130
c.Ping()[millisecond] = true
131131
}
132-
if conf.Acceptor.Logs.Heartbeat.PingSend && millisecond >= conf.Acceptor.Logs.Heartbeat.PingSendPrintDelay {
132+
if conf.Acceptor.Logs.Heartbeat.PingSend && c.Delay() >= conf.Acceptor.Logs.Heartbeat.PingSendPrintDelay {
133133
log.Println("[heartbeat][WebSocket][ping]:", c.Id(), c.RemoteAddr(), millisecond, timeNow.Format("2006-01-02 15:04:05.999"), c.Delay())
134134
}
135135
}

0 commit comments

Comments
 (0)