mirror of
https://github.com/logos-messaging/go-libp2p-pubsub.git
synced 2026-01-05 06:13:10 +00:00
reduce log spam from empty heartbeat messages
This commit is contained in:
parent
37d36d77b1
commit
257d133a07
@ -1296,7 +1296,12 @@ func (gs *GossipSubRouter) heartbeatTimer() {
|
||||
}
|
||||
|
||||
func (gs *GossipSubRouter) heartbeat() {
|
||||
defer log.Infow("heartbeat")
|
||||
start := time.Now()
|
||||
defer func() {
|
||||
if dt := time.Since(start); dt > time.Millisecond {
|
||||
log.Infow("heartbeat done", "took", dt)
|
||||
}
|
||||
}()
|
||||
|
||||
gs.heartbeatTicks++
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user