Explorar o código

feat: check the network is TCP before set MPTCP

This actually won't have any impact
Kaede Akino hai 1 ano
pai
achega
11ef2b5d28
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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)