소스 검색

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)