When happy eyeballs is enabled, DialContext makes parallel calls to dialSingle via dialParallel:
|
func dialParallel(ctx context.Context, dp *dialParam, primaries, fallbacks addrList) (Conn, error) { |
Each dialSingle call may call ctx.Value, such as here:
|
trace, _ := ctx.Value(nettrace.TraceKey{}).(*nettrace.Trace) |
dialParallel doesn't wait for all dialSingle calls to complete. This means, in theory, dialSingle can call ctx.Value on a ctx that has gone out of scope. This is effectively the same problem as #21597.
/cc @bcmills
When happy eyeballs is enabled, DialContext makes parallel calls to dialSingle via dialParallel:
go/src/net/dial.go
Line 415 in 424b065
Each dialSingle call may call ctx.Value, such as here:
go/src/net/dial.go
Line 533 in 424b065
dialParallel doesn't wait for all dialSingle calls to complete. This means, in theory, dialSingle can call ctx.Value on a ctx that has gone out of scope. This is effectively the same problem as #21597.
/cc @bcmills