stratum: prevent crash at connections thread

This commit is contained in:
ardocrat 2024-10-10 21:51:28 +03:00
parent e40d5b6474
commit c13195bd61

View file

@ -716,7 +716,7 @@ fn accept_connections(listen_addr: SocketAddr,
let mut rt = Runtime::new().unwrap(); let mut rt = Runtime::new().unwrap();
let (task, handle) = abortable(task); let (task, handle) = abortable(task);
rt.spawn(check_stop_state(stop_state, handle)); rt.spawn(check_stop_state(stop_state, handle));
rt.block_on(task).unwrap(); rt.block_on(task).unwrap_or_default();
} }
async fn check_stop_state(stop_state: Arc<StratumStopState>, handle: AbortHandle) { async fn check_stop_state(stop_state: Arc<StratumStopState>, handle: AbortHandle) {