Timer: prevent creating redundant check task, Splice: prevent set timeout when UplinkOnly/DownlinkOnly timeout is already set#5046
Timer: prevent creating redundant check task, Splice: prevent set timeout when UplinkOnly/DownlinkOnly timeout is already set#5046patterniha wants to merge 3 commits intomainfrom
Conversation
done. |
|
overridden参数太奇怪了 一个ActivityTimer应该就不存在设置之后无法触发onTimeout的情况除非被故意设置得非常长 这里防止leak的话按目的应该改成 SetTimeoutShorter 或者类似的东西 检查checkTask(如果存在)的interval大于设定的值就重置 否则不重置 |
|
splice-timeout is 8-hours, it is greater than both First, timer set to but only when timeout is /// so, if timeout is changed by /// also, in splice, we change the timeout to 8 hours, because we can't update timer when splice, so we set it to long enough value, i change it to 24 hours(default TCP NAT timeout) |
|
哦我误解了注释里的prevent leak |
|
@Fangliding changes timer codes, so i rebase this pr, after that. |
|
我不确定这是否正确 重新读了一遍我觉得这甚至应该是错的 |
? usually |
|
anyway, for my use, i set uplinkOnly/downlinkOnly to |
currently, after one timeout is set, another one will be set after timeout-exceed and function-return, but it is redundant.
//////////////////////////////////////////////////////////////////////////////////////////////
also, if UplinkOnly/DownlinkOnly timeout is already set , splice-timeout should not be set, and I will fix it soon.
Xray-core/proxy/proxy.go
Lines 599 to 602 in 33272a0