mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 13:07:17 +00:00
don't print peer logs on shutdown (#2341)
This commit is contained in:
parent
188dfb14b8
commit
b38d3fc34b
@ -249,6 +249,11 @@ func runPeer(
|
||||
printTime := time.Now().Add(time.Minute)
|
||||
peerPrinted := false
|
||||
defer func() {
|
||||
select { // don't print logs if we stopping
|
||||
case <-ctx.Done():
|
||||
return
|
||||
default:
|
||||
}
|
||||
if peerPrinted {
|
||||
log.Info(fmt.Sprintf("Peer %s [%s] disconnected", peerID, peerInfo.peer.Fullname()), "proto", protocol)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user