From 434ab1cc86a2d4a52522afc2e5b65ec105245084 Mon Sep 17 00:00:00 2001 From: komuw Date: Sun, 11 Feb 2024 21:26:24 +0300 Subject: [PATCH] net: enable mptcp by default When #56539 was accepted, it was decided[1] that MPTCP would be opt-in for a release or two, and then made opt-out. [1] https://go.dev/issue/56539#issuecomment-1309294637 Updates #56539 --- src/net/dial.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/net/dial.go b/src/net/dial.go index a6565c3ce5d13b..c23603cb41055c 100644 --- a/src/net/dial.go +++ b/src/net/dial.go @@ -18,9 +18,7 @@ const ( // See go.dev/issue/31510 defaultTCPKeepAlive = 15 * time.Second - // For the moment, MultiPath TCP is not used by default - // See go.dev/issue/56539 - defaultMPTCPEnabled = false + defaultMPTCPEnabled = true ) var multipathtcp = godebug.New("multipathtcp") @@ -43,11 +41,11 @@ func (m *mptcpStatus) get() bool { return false } - // If MPTCP is forced via GODEBUG=multipathtcp=1 - if multipathtcp.Value() == "1" { + // If MPTCP is disabled via GODEBUG=multipathtcp=0 + if multipathtcp.Value() == "0" { multipathtcp.IncNonDefault() - return true + return false } return defaultMPTCPEnabled