server: Remove unused wakeup channel.

This channel is no longer used since the outgoing connection logic is
handled by the connmgr package now.
This commit is contained in:
Dave Collins 2016-10-27 20:03:35 -05:00
parent f6ad7eb2c9
commit f3c442deb2
No known key found for this signature in database
GPG key ID: B8904D9D9C93D1F2

View file

@ -158,7 +158,6 @@ type server struct {
newPeers chan *serverPeer
donePeers chan *serverPeer
banPeers chan *serverPeer
wakeup chan struct{}
query chan interface{}
relayInv chan relayMsg
broadcast chan broadcastMsg
@ -1643,9 +1642,6 @@ func (s *server) peerHandler() {
}
go s.connManager.Start()
// if nothing else happens, wake us up soon.
time.AfterFunc(10*time.Second, func() { s.wakeup <- struct{}{} })
out:
for {
select {
@ -1674,10 +1670,6 @@ out:
case bmsg := <-s.broadcast:
s.handleBroadcastMsg(state, &bmsg)
// Used by timers below to wake us back up.
case <-s.wakeup:
// this page left intentionally blank
case qmsg := <-s.query:
s.handleQuery(state, qmsg)
@ -1705,7 +1697,6 @@ cleanup:
case <-s.peerHeightsUpdate:
case <-s.relayInv:
case <-s.broadcast:
case <-s.wakeup:
case <-s.query:
default:
break cleanup
@ -2294,7 +2285,6 @@ func newServer(listenAddrs []string, db database.DB, chainParams *chaincfg.Param
newPeers: make(chan *serverPeer, cfg.MaxPeers),
donePeers: make(chan *serverPeer, cfg.MaxPeers),
banPeers: make(chan *serverPeer, cfg.MaxPeers),
wakeup: make(chan struct{}),
query: make(chan interface{}),
relayInv: make(chan relayMsg, cfg.MaxPeers),
broadcast: make(chan broadcastMsg, cfg.MaxPeers),