Remove unused wakeup timer in peerHandler.
This commit is contained in:
parent
7d24f31fbd
commit
ad12d10503
1 changed files with 0 additions and 13 deletions
13
server.go
13
server.go
|
@ -244,7 +244,6 @@ func (s *server) peerHandler() {
|
||||||
if cfg.MaxPeers < maxOutbound {
|
if cfg.MaxPeers < maxOutbound {
|
||||||
maxOutbound = cfg.MaxPeers
|
maxOutbound = cfg.MaxPeers
|
||||||
}
|
}
|
||||||
var wakeupTimer *time.Timer
|
|
||||||
|
|
||||||
// Do initial DNS seeding to populate address manager.
|
// Do initial DNS seeding to populate address manager.
|
||||||
if !cfg.DisableDNSSeed {
|
if !cfg.DisableDNSSeed {
|
||||||
|
@ -341,13 +340,6 @@ out:
|
||||||
break 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
|
// Only try connect to more peers if we actually need more
|
||||||
if outboundPeers >= maxOutbound || len(cfg.ConnectPeers) > 0 ||
|
if outboundPeers >= maxOutbound || len(cfg.ConnectPeers) > 0 ||
|
||||||
atomic.LoadInt32(&s.shutdown) != 0 {
|
atomic.LoadInt32(&s.shutdown) != 0 {
|
||||||
|
@ -431,11 +423,6 @@ out:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if wakeupTimer != nil {
|
|
||||||
wakeupTimer.Stop()
|
|
||||||
wakeupTimer = nil
|
|
||||||
}
|
|
||||||
|
|
||||||
s.blockManager.Stop()
|
s.blockManager.Stop()
|
||||||
s.addrManager.Stop()
|
s.addrManager.Stop()
|
||||||
s.wg.Done()
|
s.wg.Done()
|
||||||
|
|
Loading…
Reference in a new issue