Skip to content

Commit

Permalink
adding debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
sukunrt committed Sep 28, 2023
1 parent 47144ab commit 3c0bc21
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions p2p/protocol/ping/ping.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,12 @@ func (p *PingService) PingHandler(s network.Stream) {
log.Debug("ping timeout")
case err, ok := <-errCh:
if ok {
log.Debug(err)
log.Error("ping close:", err)
} else {
log.Error("ping loop failed without error")
}
}
log.Error("calling ping stream close")
s.Close()
}()

Expand All @@ -86,7 +87,7 @@ func (p *PingService) PingHandler(s network.Stream) {
errCh <- err
return
}

log.Error("written to stream")
timer.Reset(pingTimeout)
}
}
Expand Down

0 comments on commit 3c0bc21

Please sign in to comment.