mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-08 05:57:03 +09:00
add DialContext to yamux transport
This commit is contained in:
parent
7896963d6d
commit
a11728fb25
1 changed files with 2 additions and 1 deletions
|
@ -104,7 +104,8 @@ func (y *yamuxTransport) AddListener(lis net.Listener) {
|
|||
|
||||
func (y *yamuxTransport) Dial(ctx context.Context, addr string) (mc transport.MultiConn, err error) {
|
||||
dialTimeout := time.Duration(y.conf.DialTimeoutSec) * time.Second
|
||||
conn, err := net.DialTimeout("tcp", addr, dialTimeout)
|
||||
dialer := &net.Dialer{Timeout: dialTimeout}
|
||||
conn, err := dialer.DialContext(ctx, "tcp", addr)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue