Fix nil check

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
Jakub Sztandera 2019-12-10 16:22:02 +01:00
parent 9d9040558f
commit a53d1031db
No known key found for this signature in database
GPG Key ID: 9A9AF56F8B3879BA

View File

@ -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