Skip to content

Commit 57eb9ae

Browse files
committed
nilaway: dialers/retrier.go
1 parent 4769f8c commit 57eb9ae

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

intra/dialers/retrier.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,6 @@ func (r *retrier) dialLocked() (c protect.Conn, err error) {
317317
// dialStrat returns a core.DuplexConn to r.raddr using a specified strategy, strat,
318318
// which is one of the settings.Split* constants.
319319
func (r *retrier) doDialLocked(dialStrat int32) (protect.Conn, error) {
320-
network := r.laddr.Network()
321320
if r.multidial {
322321
var errs error
323322
for ; r.nextDialerIdx < len(r.dialers); r.nextDialerIdx++ {
@@ -336,6 +335,7 @@ func (r *retrier) doDialLocked(dialStrat int32) (protect.Conn, error) {
336335

337336
di := r.dialers[0] // always use the first dialer when not multidialing
338337

338+
network := r.raddr.Network()
339339
if isTCP := strings.HasPrefix(network, "tcp"); !isTCP {
340340
return protect.Dial(di, r.laddr, r.raddr)
341341
}
@@ -350,7 +350,7 @@ func (r *retrier) doDialLocked(dialStrat int32) (protect.Conn, error) {
350350
fallthrough
351351
default:
352352
}
353-
tc, terr := protect.DialTCP(di, r.raddr.Network(), r.laddr, r.raddr)
353+
tc, terr := protect.DialTCP(di, network, r.laddr, r.raddr)
354354
if terr != nil || tc == nil {
355355
return nil, core.JoinErr(terr, errNilConn)
356356
}

0 commit comments

Comments
 (0)