Skip to content

Commit 9dbdf92

Browse files
authored
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.
1 parent 96fb680 commit 9dbdf92

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

transport/internet/splithttp/dialer.go

+3
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,9 @@ func Dial(ctx context.Context, dest net.Destination, streamSettings *internet.Me
308308
globalDialerAccess.Lock()
309309
if streamSettings.DownloadSettings == nil {
310310
streamSettings.DownloadSettings = common.Must2(internet.ToMemoryStreamConfig(transportConfiguration.DownloadSettings)).(*internet.MemoryStreamConfig)
311+
if streamSettings.DownloadSettings.SocketSettings == nil {
312+
streamSettings.DownloadSettings.SocketSettings = streamSettings.SocketSettings
313+
}
311314
}
312315
globalDialerAccess.Unlock()
313316
memory2 := streamSettings.DownloadSettings

0 commit comments

Comments
 (0)