Преглед изворни кода

The updater can just shut down with the main function

Vecna пре 2 година
родитељ
комит
f0133ce0dc
1 измењених фајлова са 1 додато и 3 уклоњено
  1. 1 3
      src/bin/server.rs

+ 1 - 3
src/bin/server.rs

@@ -183,11 +183,9 @@ async fn main() {
     let updater_tx = request_tx.clone();
     let updater_tx = request_tx.clone();
     let shutdown_cmd_tx = request_tx.clone();
     let shutdown_cmd_tx = request_tx.clone();
 
 
-    // create the shutdown broadcast channel and clone for every thread
+    // create the shutdown broadcast channel
     let (shutdown_tx, mut shutdown_rx) = broadcast::channel(16);
     let (shutdown_tx, mut shutdown_rx) = broadcast::channel(16);
     let kill = shutdown_tx.subscribe();
     let kill = shutdown_tx.subscribe();
-    // TODO: Gracefully shut down updater
-    let kill_updater = shutdown_tx.subscribe();
 
 
     // Listen for ctrl_c, send signal to broadcast shutdown to all threads by dropping shutdown_tx
     // Listen for ctrl_c, send signal to broadcast shutdown to all threads by dropping shutdown_tx
     let shutdown_handler = spawn(async move {
     let shutdown_handler = spawn(async move {