aboutsummaryrefslogtreecommitdiffstats
path: root/p2p
diff options
context:
space:
mode:
authorferhat elmas <elmas.ferhat@gmail.com>2017-12-04 18:07:10 +0800
committerFelix Lange <fjl@users.noreply.github.com>2017-12-04 18:07:10 +0800
commit1d06e41f04d75c31334c455063e9ec7b4136bf23 (patch)
tree46ee6e5ead5cc7c00252c4bcee35ff3778548a16 /p2p
parent43dd8e62fcc854d1ad51f3a49b118d40397b7fd8 (diff)
downloaddexon-1d06e41f04d75c31334c455063e9ec7b4136bf23.tar.gz
dexon-1d06e41f04d75c31334c455063e9ec7b4136bf23.tar.zst
dexon-1d06e41f04d75c31334c455063e9ec7b4136bf23.zip
p2p, swarm/network/kademlia: use IsZero to check for zero time (#15603)
Diffstat (limited to 'p2p')
-rw-r--r--p2p/dial.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/p2p/dial.go b/p2p/dial.go
index 8ca3dc5a1..f5ff2c211 100644
--- a/p2p/dial.go
+++ b/p2p/dial.go
@@ -157,7 +157,7 @@ func (s *dialstate) removeStatic(n *discover.Node) {
}
func (s *dialstate) newTasks(nRunning int, peers map[discover.NodeID]*Peer, now time.Time) []task {
- if s.start == (time.Time{}) {
+ if s.start.IsZero() {
s.start = now
}