Fix nil check
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
parent
9d9040558f
commit
a53d1031db
@ -131,7 +131,9 @@ func (hs *Service) SayHello(ctx context.Context, pid peer.ID) error {
|
||||
latency := time.Since(start)
|
||||
|
||||
// add to peer tracker
|
||||
hs.pmgr.SetPeerLatency(pid, latency)
|
||||
if hs.pmgr != nil {
|
||||
hs.pmgr.SetPeerLatency(pid, latency)
|
||||
}
|
||||
}()
|
||||
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user