mirror of
https://github.com/Tencent/BrowserSkill.git
synced 2026-09-10 13:01:23 +08:00
test: avoid probe race in idle daemon helper
This commit is contained in:
@@ -47,9 +47,7 @@ async fn spawn_daemon_with_connect_wait(connect_wait: Duration) -> (daemon::Daem
|
|||||||
}
|
}
|
||||||
|
|
||||||
async fn spawn_daemon_with_session_idle(session_idle: Duration) -> (daemon::DaemonHandle, PathBuf) {
|
async fn spawn_daemon_with_session_idle(session_idle: Duration) -> (daemon::DaemonHandle, PathBuf) {
|
||||||
let probe = TcpListener::bind("127.0.0.1:0").await.unwrap();
|
let port = 0;
|
||||||
let port = probe.local_addr().unwrap().port();
|
|
||||||
drop(probe);
|
|
||||||
|
|
||||||
let mut config = DaemonConfig::new(port);
|
let mut config = DaemonConfig::new(port);
|
||||||
config.session_idle = session_idle;
|
config.session_idle = session_idle;
|
||||||
|
|||||||
Reference in New Issue
Block a user