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:
parent
f6ad7eb2c9
commit
f3c442deb2
1 changed files with 0 additions and 10 deletions
10
server.go
10
server.go
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue