Fix nil check

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
Jakub Sztandera
2019-12-10 16:36:53 +01:00
parent 9d9040558f
commit a53d1031db
+3 -1
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