cleanup: remove unused channel ready (#2353)

This commit is contained in:
Menghan Li 2018-10-11 13:10:45 -07:00 committed by GitHub
parent dc3d58fc3e
commit c05280cc73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 19 deletions

View File

@ -885,9 +885,6 @@ type addrConn struct {
// Use updateConnectivityState for updating addrConn's connectivity state.
state connectivity.State
// ready is closed and becomes nil when a new transport is up or failed
// due to timeout.
ready chan struct{}
tearDownErr error // The reason this addrConn is torn down.
@ -994,10 +991,6 @@ func (ac *addrConn) resetTransport(resolveNow bool) {
ac.mu.Unlock()
return
}
if ac.ready != nil {
close(ac.ready)
ac.ready = nil
}
ac.transport = nil
backoffIdx := ac.backoffIdx
@ -1194,10 +1187,6 @@ func (ac *addrConn) createTransport(backoffNum int, addr resolver.Address, copts
ac.cc.handleSubConnStateChange(ac.acbw, ac.state)
ac.transport = newTr
ac.curAddr = addr
if ac.ready != nil {
close(ac.ready)
ac.ready = nil
}
ac.mu.Unlock()
@ -1238,10 +1227,6 @@ func (ac *addrConn) nextAddr() error {
return errConnClosing
}
ac.cc.resolveNow(resolver.ResolveNowOption{})
if ac.ready != nil {
close(ac.ready)
ac.ready = nil
}
backoffDeadline := ac.backoffDeadline
b := ac.resetBackoff
ac.mu.Unlock()
@ -1319,10 +1304,6 @@ func (ac *addrConn) tearDown(err error) {
ac.events.Finish()
ac.events = nil
}
if ac.ready != nil {
close(ac.ready)
ac.ready = nil
}
if channelz.IsOn() {
channelz.AddTraceEvent(ac.channelzID, &channelz.TraceEventDesc{
Desc: "Subchannel Deleted",