From ad12d105033f5575a20f28fa0433d874028c0d4f Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Wed, 2 Oct 2013 13:52:44 -0500 Subject: [PATCH] Remove unused wakeup timer in peerHandler. --- server.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/server.go b/server.go index 840ed8b6..f1a8cd02 100644 --- a/server.go +++ b/server.go @@ -244,7 +244,6 @@ func (s *server) peerHandler() { if cfg.MaxPeers < maxOutbound { maxOutbound = cfg.MaxPeers } - var wakeupTimer *time.Timer // Do initial DNS seeding to populate address manager. if !cfg.DisableDNSSeed { @@ -341,13 +340,6 @@ out: break out } - // Timer was just to make sure we woke up again soon. so cancel - // and remove it as soon as we next come around. - if wakeupTimer != nil { - wakeupTimer.Stop() - wakeupTimer = nil - } - // Only try connect to more peers if we actually need more if outboundPeers >= maxOutbound || len(cfg.ConnectPeers) > 0 || atomic.LoadInt32(&s.shutdown) != 0 { @@ -431,11 +423,6 @@ out: } } - if wakeupTimer != nil { - wakeupTimer.Stop() - wakeupTimer = nil - } - s.blockManager.Stop() s.addrManager.Stop() s.wg.Done()