[#4] dialer: Fix typo

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2023-10-23 18:36:43 +03:00
parent e0145b3a5f
commit e7a9cd76ff
2 changed files with 4 additions and 4 deletions

View file

@ -37,7 +37,7 @@ func (r *roundRobin) DialContext(ctx context.Context, s *Subnet, network, addres
dd := r.d.dialer
dd.LocalAddr = ii.LocalAddr
return r.d.dialContext(&dd, ctx, "tcp", address)
return r.d.dialContext(&dd, ctx, network, address)
}
return nil, errors.New("(*roundRobin).DialContext: no suitale node found")
}
@ -55,7 +55,7 @@ func (r *firstEnabled) DialContext(ctx context.Context, s *Subnet, network, addr
dd := r.d.dialer
dd.LocalAddr = ii.LocalAddr
return r.d.dialContext(&dd, ctx, "tcp", address)
return r.d.dialContext(&dd, ctx, network, address)
}
return nil, errors.New("(*firstEnabled).DialContext: no suitale node found")
}

View file

@ -366,9 +366,9 @@ func (d *dialer) dialAddr(ctx context.Context, network, address string, addr net
func (d *dialer) dialContext(nd *net.Dialer, ctx context.Context, network, address string) (net.Conn, error) {
if h := d.testHookDialContext; h != nil {
return h(nd, ctx, "tcp", address)
return h(nd, ctx, network, address)
}
return nd.DialContext(ctx, "tcp", address)
return nd.DialContext(ctx, network, address)
}
// UpdateInterface implements the Multidialer interface.