Make use of the new context parameter in conntrack Wait
This commit is contained in:
parent
376c669445
commit
5829c30146
|
@ -516,10 +516,15 @@ func (cl *Client) dialFirst(ctx context.Context, addr string) dialResult {
|
|||
left++
|
||||
go func() {
|
||||
cte := cl.config.ConnTracker.Wait(
|
||||
ctx,
|
||||
conntrack.Entry{network, s.Addr().String(), addr},
|
||||
"dial torrent client",
|
||||
0,
|
||||
)
|
||||
if ctx.Err() != nil {
|
||||
resCh <- dialResult{}
|
||||
return
|
||||
}
|
||||
c, err := s.dial(ctx, addr)
|
||||
// This is a bit optimistic, but it looks non-trivial to thread
|
||||
// this through the proxy code. Set it now in case we close the
|
||||
|
|
Loading…
Reference in New Issue