mirror of
https://github.com/openai/codex.git
synced 2026-09-08 15:50:34 +00:00
Merge 360ccded1a into sapling-pr-archive-bolinfest
This commit is contained in:
@@ -541,7 +541,14 @@ impl WebSocketTestServer {
|
||||
|
||||
pub async fn shutdown(self) {
|
||||
let _ = self.shutdown.send(());
|
||||
let _ = self.task.await;
|
||||
let mut task = self.task;
|
||||
if tokio::time::timeout(Duration::from_secs(10), &mut task)
|
||||
.await
|
||||
.is_err()
|
||||
{
|
||||
task.abort();
|
||||
let _ = task.await;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user