Commit 781cd318 authored by Marten Seemann's avatar Marten Seemann
Browse files

use the context for dialing

parent bd68e9bc
...@@ -26,8 +26,6 @@ var quicConfig = &quic.Config{ ...@@ -26,8 +26,6 @@ var quicConfig = &quic.Config{
}, },
} }
var quicDialAddr = quic.DialAddr
// The Transport implements the tpt.Transport interface for QUIC connections. // The Transport implements the tpt.Transport interface for QUIC connections.
type transport struct { type transport struct {
privKey ic.PrivKey privKey ic.PrivKey
...@@ -84,7 +82,7 @@ func (t *transport) Dial(ctx context.Context, raddr ma.Multiaddr, p peer.ID) (tp ...@@ -84,7 +82,7 @@ func (t *transport) Dial(ctx context.Context, raddr ma.Multiaddr, p peer.ID) (tp
} }
return nil return nil
} }
sess, err := quicDialAddr(host, tlsConf, quicConfig) sess, err := quic.DialAddrContext(ctx, host, tlsConf, quicConfig)
if err != nil { if err != nil {
return nil, err return nil, err
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment