Skip to content

Commit

Permalink
XHTTP downloadSettings: Inherit sockopt if its own doesn't exist …
Browse files Browse the repository at this point in the history
…(e.g., in `extra`)

If you want `downloadSettings` to use its own `sockopt`, make sure that `extra` doesn't exist.
  • Loading branch information
RPRX authored Dec 18, 2024
1 parent 96fb680 commit 9dbdf92
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions transport/internet/splithttp/dialer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9dbdf92

Please sign in to comment.