les: grammar fix

This commit is contained in:
rjl493456442 2018-06-25 16:19:24 +08:00
parent 5cf0cfd971
commit 094038bd3c

View file

@ -219,7 +219,7 @@ func (pool *serverPool) disconnect(entry *poolEntry) {
log.Debug("Disconnected old entry", "enode", entry.id) log.Debug("Disconnected old entry", "enode", entry.id)
req := &disconnReq{entry: entry, stopped: stopped, done: make(chan struct{})} req := &disconnReq{entry: entry, stopped: stopped, done: make(chan struct{})}
// Block until disconnection request be served. // Block until disconnection request is served.
pool.disconnCh <- req pool.disconnCh <- req
<-req.done <-req.done
} }
@ -384,13 +384,13 @@ func (pool *serverPool) eventLoop() {
close(pool.discSetPeriod) close(pool.discSetPeriod)
} }
// Spawn a goroutine to close the disconnCh until all connections are disconnected. // Spawn a goroutine to close the disconnCh after all connections are disconnected.
go func() { go func() {
pool.connWg.Wait() pool.connWg.Wait()
close(pool.disconnCh) close(pool.disconnCh)
}() }()
// Handle all remain disconnection requests before exit. // Handle all remaining disconnection requests before exit.
for req := range pool.disconnCh { for req := range pool.disconnCh {
disconnect(req, true) disconnect(req, true)
} }