Merge pull request #1106 from dfawley/cc_cancel

Add comment explaining why cancel is not called in success path after client transport is created
This commit is contained in:
Menghan Li
2017-03-06 12:00:49 -08:00
committed by GitHub

View File

@ -777,6 +777,8 @@ func (ac *addrConn) resetTransport(closeTransport bool) error {
Metadata: ac.addr.Metadata, Metadata: ac.addr.Metadata,
} }
newTransport, err := transport.NewClientTransport(ctx, sinfo, ac.dopts.copts) newTransport, err := transport.NewClientTransport(ctx, sinfo, ac.dopts.copts)
// Don't call cancel in success path due to a race in Go 1.6:
// https://github.com/golang/go/issues/15078.
if err != nil { if err != nil {
cancel() cancel()