Explorar o código

Allow sync_log_entry daemon to exit before election daemon.

Jing Yang %!s(int64=3) %!d(string=hai) anos
pai
achega
51cbafc283
Modificáronse 1 ficheiros con 2 adicións e 3 borrados
  1. 2 3
      src/sync_log_entries.rs

+ 2 - 3
src/sync_log_entries.rs

@@ -50,9 +50,8 @@ impl SyncLogEntriesComms {
     }
 
     pub fn kill(&self) {
-        self.tx
-            .send(Event::Shutdown)
-            .expect("The sync log entries daemon should still be alive");
+        // The sync log entry daemon might have exited.
+        let _ = self.tx.send(Event::Shutdown);
     }
 
     fn rerun(&self, peer: Peer) {