This commit is contained in:
Nishant Das 2020-05-11 19:36:42 +08:00 committed by GitHub
parent 6840afb45e
commit 1110a5caab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -133,7 +133,9 @@ func (s *Service) AddConnectionHandler(reqFunc func(ctx context.Context, id peer
disconnectFromPeer()
return
}
if !updated.After(currentTime) {
// exit if we don't receive any current status messages from
// peer.
if updated.IsZero() || !updated.After(currentTime) {
disconnectFromPeer()
return
}