mirror of https://github.com/XTLS/Xray-core
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.pull/4160/head
parent
96fb680d45
commit
9dbdf92c27
|
@ -308,6 +308,9 @@ func Dial(ctx context.Context, dest net.Destination, streamSettings *internet.Me
|
||||||
globalDialerAccess.Lock()
|
globalDialerAccess.Lock()
|
||||||
if streamSettings.DownloadSettings == nil {
|
if streamSettings.DownloadSettings == nil {
|
||||||
streamSettings.DownloadSettings = common.Must2(internet.ToMemoryStreamConfig(transportConfiguration.DownloadSettings)).(*internet.MemoryStreamConfig)
|
streamSettings.DownloadSettings = common.Must2(internet.ToMemoryStreamConfig(transportConfiguration.DownloadSettings)).(*internet.MemoryStreamConfig)
|
||||||
|
if streamSettings.DownloadSettings.SocketSettings == nil {
|
||||||
|
streamSettings.DownloadSettings.SocketSettings = streamSettings.SocketSettings
|
||||||
|
}
|
||||||
}
|
}
|
||||||
globalDialerAccess.Unlock()
|
globalDialerAccess.Unlock()
|
||||||
memory2 := streamSettings.DownloadSettings
|
memory2 := streamSettings.DownloadSettings
|
||||||
|
|
Loading…
Reference in New Issue