瀏覽代碼

feat: check the network is TCP before set MPTCP

This actually won't have any impact
Kaede Akino 1 年之前
父節點
當前提交
11ef2b5d28
共有 1 個文件被更改,包括 1 次插入1 次删除
  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)