From 9dbdf92c2728070e3e58008598880eb2e9f79188 Mon Sep 17 00:00:00 2001 From: RPRX <63339210+RPRX@users.noreply.github.com> Date: Wed, 18 Dec 2024 11:22:29 +0000 Subject: [PATCH] XHTTP `downloadSettings`: Inherit `sockopt` if its own doesn't exist (e.g., in `extra`) If you want `downloadSettings` to use its own `sockopt`, make sure that `extra` doesn't exist. --- transport/internet/splithttp/dialer.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/transport/internet/splithttp/dialer.go b/transport/internet/splithttp/dialer.go index 973b8a9c..86c395d0 100644 --- a/transport/internet/splithttp/dialer.go +++ b/transport/internet/splithttp/dialer.go @@ -308,6 +308,9 @@ func Dial(ctx context.Context, dest net.Destination, streamSettings *internet.Me globalDialerAccess.Lock() if streamSettings.DownloadSettings == nil { streamSettings.DownloadSettings = common.Must2(internet.ToMemoryStreamConfig(transportConfiguration.DownloadSettings)).(*internet.MemoryStreamConfig) + if streamSettings.DownloadSettings.SocketSettings == nil { + streamSettings.DownloadSettings.SocketSettings = streamSettings.SocketSettings + } } globalDialerAccess.Unlock() memory2 := streamSettings.DownloadSettings