Browse Source

feat: check the network is TCP before set MPTCP

This actually won't have any impact
Kaede Akino 1 year ago
parent
commit
11ef2b5d28
1 changed files with 1 additions and 1 deletions
  1. 1 1
      transport/internet/system_dialer.go

+ 1 - 1
transport/internet/system_dialer.go

@@ -73,7 +73,7 @@ func (d *DefaultSystemDialer) Dial(ctx context.Context, src net.Address, dest ne
 		KeepAlive: goStdKeepAlive,
 	}
 
-	if sockopt != nil {
+	if dest.Network == net.Network_TCP && sockopt != nil {
 		switch sockopt.Mptcp {
 		case MPTCPState_Enable:
 			dialer.SetMultipathTCP(true)