Skip to content

Commit

Permalink
internal: transport nil should happen before backoff (#2392)
Browse files Browse the repository at this point in the history
Seems to fix https://travis-ci.org/grpc/grpc-go/jobs/443409852, but regardless
it's a more correct place for it to happen.
  • Loading branch information
jeanbza authored Oct 22, 2018
1 parent 93a2ad2 commit e120c3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clientconn.go
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,7 @@ func (ac *addrConn) resetTransport(resolveNow bool) {
ac.updateConnectivityState(connectivity.TransientFailure)
ac.cc.handleSubConnStateChange(ac.acbw, ac.state)
}
ac.transport = nil
ac.mu.Unlock()

if err := ac.nextAddr(); err != nil {
Expand All @@ -976,7 +977,6 @@ func (ac *addrConn) resetTransport(resolveNow bool) {
ac.mu.Unlock()
return
}
ac.transport = nil

backoffIdx := ac.backoffIdx
backoffFor := ac.dopts.bs.Backoff(backoffIdx)
Expand Down

0 comments on commit e120c3f

Please sign in to comment.