Skip to content

Commit 92c05b6

Browse files
committed
wait for spirc task to finish
1 parent d0d9f80 commit 92c05b6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main_loop.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,8 @@ impl MainLoop {
217217
// a new session has been started via the discovery stream
218218
_ = self.credentials_provider.incoming_connection() => {
219219
let _ = shared_spirc.shutdown();
220+
// Ensure the current spirc task finishes cleanly before switching sessions
221+
let _ = (&mut spirc_task).await;
220222
break;
221223
}
222224
// the program should shut down

0 commit comments

Comments
 (0)