mirror of
https://github.com/shadowsocks/ShadowsocksX-NG.git
synced 2026-10-29 05:33:45 +00:00
fix(agent): extend listener readiness deadline
This commit is contained in:
@@ -2,8 +2,8 @@ import Foundation
|
||||
|
||||
// MARK: - 监听建立判定
|
||||
|
||||
/// 监听判定时限:sslocal 拉起后 3 秒内应完成本地监听绑定。
|
||||
let listenEstablishmentDeadline: TimeInterval = 3
|
||||
/// 监听判定时限:sslocal 拉起后 5 秒内应完成本地监听绑定。
|
||||
let listenEstablishmentDeadline: TimeInterval = 5
|
||||
/// 单次探测超时与轮询间隔;正常启动百毫秒级完成,超时路径总耗时不超时限太多。
|
||||
let listenProbeTimeout: TimeInterval = 0.25
|
||||
let listenProbeInterval: TimeInterval = 0.1
|
||||
|
||||
@@ -247,7 +247,7 @@ final class AgentLifecycleListenDeadlineTests: AgentLifecycleTests {
|
||||
}
|
||||
return log.contains("listen not established within deadline")
|
||||
},
|
||||
"3 秒未建立监听应以 error 日志点名(D10),实际 agent.log:\(agentLog())")
|
||||
"5 秒未建立监听应以 error 日志点名(D10),实际 agent.log:\(agentLog())")
|
||||
XCTAssertEqual(try waitForExit(wrapper), 0)
|
||||
XCTAssertNotNil(RuntimeFileStore(fileURL: contractURL).readFailure())
|
||||
XCTAssertTrue(stateLog().contains("SIGTERM"))
|
||||
|
||||
Reference in New Issue
Block a user