Fix wait command client timeouts and test failures

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Harivansh Rathi 2026-03-25 21:06:42 -04:00
parent f87ac61790
commit 7f12524fbb
4 changed files with 47 additions and 19 deletions

View file

@ -21,6 +21,13 @@ pub fn env_lock() -> &'static Mutex<()> {
LOCK.get_or_init(|| Mutex::new(()))
}
pub fn env_lock_guard() -> std::sync::MutexGuard<'static, ()> {
match env_lock().lock() {
Ok(guard) => guard,
Err(poisoned) => poisoned.into_inner(),
}
}
pub struct SessionEnvGuard {
old_session_type: Option<String>,
}