summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--talpid-routing/src/unix/mod.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/talpid-routing/src/unix/mod.rs b/talpid-routing/src/unix/mod.rs
index a979b362e0..768000c010 100644
--- a/talpid-routing/src/unix/mod.rs
+++ b/talpid-routing/src/unix/mod.rs
@@ -331,8 +331,9 @@ impl RouteManager {
impl Drop for RouteManager {
fn drop(&mut self) {
- tokio::task::block_in_place(move || {
- tokio::runtime::Handle::current().block_on(self.stop());
- });
+ if let Some(tx) = self.manage_tx.take() {
+ let (done_tx, _) = oneshot::channel();
+ let _ = tx.unbounded_send(RouteManagerCommand::Shutdown(done_tx));
+ }
}
}