mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-05-01 01:44:15 +00:00
XHTTP XMUX: cMaxLifetimeMs
-> hMaxReusableSecs
, Refactor default values
"xmux": { "maxConcurrency": "16-32", "maxConnections": 0, "cMaxReuseTimes": 0, "hMaxRequestTimes": "600-900", "hMaxReusableSecs": "1800-3000", "hKeepAlivePeriod": 0 } Fixes https://github.com/XTLS/Xray-core/discussions/4113#discussioncomment-11685057
This commit is contained in:
parent
93f72db9fd
commit
4ce65fc74c
6 changed files with 143 additions and 142 deletions
|
@ -447,7 +447,8 @@ func Dial(ctx context.Context, dest net.Destination, streamSettings *internet.Me
|
|||
|
||||
lastWrite = time.Now()
|
||||
|
||||
if xmuxClient != nil && xmuxClient.LeftRequests.Add(-1) <= 0 {
|
||||
if xmuxClient != nil && (xmuxClient.LeftRequests.Add(-1) <= 0 ||
|
||||
(xmuxClient.UnreusableAt != time.Time{} && lastWrite.After(xmuxClient.UnreusableAt))) {
|
||||
httpClient, xmuxClient = getHTTPClient(ctx, dest, streamSettings)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue