Browse Source

Set running flag to false if falling out of oidc run loop

Grant Limberg 3 years ago
parent
commit
5a8d2c3cb4
1 changed files with 4 additions and 2 deletions
  1. 4 2
      zeroidc/src/lib.rs

+ 4 - 2
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) {
     pub fn set_nonce_and_csrf(&mut self, csrf_token: String, nonce: String) {
         let local = Arc::clone(&self.inner);
         let local = Arc::clone(&self.inner);
-        let _ = (*local.lock().expect("can't lock inner"))
+        (*local.lock().expect("can't lock inner"))
             .as_opt()
             .as_opt()
             .map(|i| {
             .map(|i| {
                 if i.running {
                 if i.running {