diff options
| -rw-r--r-- | mullvad-jni/src/lib.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mullvad-jni/src/lib.rs b/mullvad-jni/src/lib.rs index 755cfce623..1dd7c86942 100644 --- a/mullvad-jni/src/lib.rs +++ b/mullvad-jni/src/lib.rs @@ -122,6 +122,9 @@ pub extern "system" fn Java_net_mullvad_mullvadvpn_service_MullvadDaemon_shutdow if let Some(context) = DAEMON_CONTEXT.lock().unwrap().take() { _ = context.daemon_command_tx.shutdown(); _ = context.runtime.block_on(context.running_daemon); + + // Dropping the tokio runtime will block if there are any tasks in flight. + // That is, until all async tasks yield *and* all blocking threads have stopped. } } |
