Skip to content

Commit beb254b

Browse files
committed
feat: revew timeout endpoint online implem
1 parent e02dcd3 commit beb254b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -355,11 +355,11 @@ async fn create_endpoint(
355355
}
356356
let endpoint = builder.bind().await?;
357357

358-
let _ = tokio::time::timeout(Duration::from_secs(30), async {
359-
if !(common.relay == RelayModeOption::Disabled) {
358+
if !(common.relay == RelayModeOption::Disabled) {
359+
let _ = tokio::time::timeout(Duration::from_secs(30), async {
360360
endpoint.online().await;
361-
}
362-
}).await;
361+
}).await;
362+
};
363363

364364
Ok(endpoint)
365365
}

0 commit comments

Comments
 (0)