From e7a9cd76ff5bf65897989ba3e456994bb5bc812f Mon Sep 17 00:00:00 2001 From: Dmitrii Stepanov Date: Mon, 23 Oct 2023 18:36:43 +0300 Subject: [PATCH] [#4] dialer: Fix typo Signed-off-by: Dmitrii Stepanov --- balancer.go | 4 ++-- dialer.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/balancer.go b/balancer.go index 67245ea..6454aa9 100644 --- a/balancer.go +++ b/balancer.go @@ -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") } diff --git a/dialer.go b/dialer.go index 66025b6..086b9b8 100644 --- a/dialer.go +++ b/dialer.go @@ -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.