Remove unused wakeup timer in peerHandler.

This commit is contained in:
Dave Collins 2013-10-02 13:52:44 -05:00
parent 7d24f31fbd
commit ad12d10503

View file

@ -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()