Disable MPTCP by default
Co-authored-by: Kevin Pollet <pollet.kevin@gmail.com>
This commit is contained in:
parent
27326e6569
commit
b2b4b66b08
2 changed files with 20 additions and 1 deletions
|
|
@ -457,7 +457,15 @@ func buildProxyProtocolListener(ctx context.Context, entryPoint *static.EntryPoi
|
|||
}
|
||||
|
||||
func buildListener(ctx context.Context, entryPoint *static.EntryPoint) (net.Listener, error) {
|
||||
listener, err := net.Listen("tcp", entryPoint.GetAddress())
|
||||
config := net.ListenConfig{}
|
||||
|
||||
// TODO: Look into configuring keepAlive period through listenConfig instead of our custom tcpKeepAliveListener, to reactivate MultipathTCP?
|
||||
// MultipathTCP is not supported on all platforms, and is notably unsupported in combination with TCP keep-alive.
|
||||
if !strings.Contains(os.Getenv("GODEBUG"), "multipathtcp") {
|
||||
config.SetMultipathTCP(false)
|
||||
}
|
||||
|
||||
listener, err := config.Listen(ctx, "tcp", entryPoint.GetAddress())
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error opening listener: %w", err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue