From 5a8d2c3cb4b59c4b158dbc20d4b3c11f944f3135 Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Wed, 22 Jun 2022 17:36:24 -0700 Subject: [PATCH] Set running flag to false if falling out of oidc run loop --- zeroidc/src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zeroidc/src/lib.rs b/zeroidc/src/lib.rs index dae3cc002..6bc9de90b 100644 --- a/zeroidc/src/lib.rs +++ b/zeroidc/src/lib.rs @@ -375,7 +375,9 @@ impl ZeroIDC { } } - println!("thread done!") + println!("thread done!"); + (*inner_local.lock().unwrap()).running = false; + println!("set idc thread running flag to false"); })); } } @@ -400,7 +402,7 @@ impl ZeroIDC { pub fn set_nonce_and_csrf(&mut self, csrf_token: String, nonce: String) { let local = Arc::clone(&self.inner); - let _ = (*local.lock().expect("can't lock inner")) + (*local.lock().expect("can't lock inner")) .as_opt() .map(|i| { if i.running {