1
0
mirror of https://github.com/golang/go synced 2024-11-19 03:54:42 -07:00

pc.alt == nil not w.pc.alt == nil

This commit is contained in:
Tom Thorogood 2019-09-13 20:23:22 +09:30 committed by Tom Thorogood
parent 7e1634c65c
commit 677ad13afc
No known key found for this signature in database
GPG Key ID: 86C63CDA416C6D2F

View File

@ -1197,7 +1197,7 @@ func (t *Transport) getConn(treq *transportRequest, cm connectMethod) (pc *persi
pc := w.pc pc := w.pc
// Trace only for HTTP/1. // Trace only for HTTP/1.
// HTTP/2 calls trace.GotConn itself. // HTTP/2 calls trace.GotConn itself.
if w.pc.alt == nil && trace != nil && trace.GotConn != nil { if pc.alt == nil && trace != nil && trace.GotConn != nil {
trace.GotConn(pc.gotIdleConnTrace(pc.idleAt)) trace.GotConn(pc.gotIdleConnTrace(pc.idleAt))
} }
// set request canceler to some non-nil function so we // set request canceler to some non-nil function so we