diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/net/dial.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/net/dial.go b/src/net/dial.go index a87c57603a..10c0068449 100644 --- a/src/net/dial.go +++ b/src/net/dial.go @@ -572,7 +572,8 @@ func (d *Dialer) dialCtx(ctx context.Context) (context.Context, context.CancelFu } } if oldCancel := d.Cancel; oldCancel != nil { - subCtx, cancel2 := context.WithCancel(ctx) + var subCtx context.Context + subCtx, cancel2 = context.WithCancel(ctx) go func() { select { case <-oldCancel: |
