From 1d06e41f04d75c31334c455063e9ec7b4136bf23 Mon Sep 17 00:00:00 2001 From: ferhat elmas Date: Mon, 4 Dec 2017 11:07:10 +0100 Subject: p2p, swarm/network/kademlia: use IsZero to check for zero time (#15603) --- p2p/dial.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'p2p') 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 } -- cgit