Skip to content

Commit

Permalink
Fix: nullcheck on alternative systemDialer (#959)
Browse files Browse the repository at this point in the history
* fix: null-check on alternative systemDialer
* delete deprecated option DualStack
  • Loading branch information
rurirei committed May 2, 2021
1 parent 980fb59 commit 1822504
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions transport/internet/system_dialer.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ func (d *DefaultSystemDialer) Dial(ctx context.Context, src net.Address, dest ne

dialer := &net.Dialer{
Timeout: time.Second * 16,
DualStack: true,
LocalAddr: resolveSrcAddr(dest.Network, src),
}

Expand Down Expand Up @@ -160,7 +159,7 @@ func (v *SimpleSystemDialer) Dial(ctx context.Context, src net.Address, dest net
// v2ray:api:stable
func UseAlternativeSystemDialer(dialer SystemDialer) {
if dialer == nil {
effectiveSystemDialer = &DefaultSystemDialer{}
dialer = &DefaultSystemDialer{}
}
effectiveSystemDialer = dialer
}
Expand Down

0 comments on commit 1822504

Please sign in to comment.