File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -251,7 +251,6 @@ pub enum CallbackMessage {
251
251
/// the route will be adjusted dynamically when the default route changes.
252
252
pub struct RouteManager {
253
253
manage_tx : Option < Arc < UnboundedSender < RouteManagerCommand > > > ,
254
- runtime : tokio:: runtime:: Handle ,
255
254
}
256
255
257
256
impl RouteManager {
@@ -274,7 +273,6 @@ impl RouteManager {
274
273
tokio:: spawn ( manager. run ( manage_rx) ) ;
275
274
276
275
Ok ( Self {
277
- runtime : tokio:: runtime:: Handle :: current ( ) ,
278
276
manage_tx : Some ( manage_tx) ,
279
277
} )
280
278
}
@@ -333,6 +331,8 @@ impl RouteManager {
333
331
334
332
impl Drop for RouteManager {
335
333
fn drop ( & mut self ) {
336
- self . runtime . clone ( ) . block_on ( self . stop ( ) ) ;
334
+ tokio:: task:: block_in_place ( move || {
335
+ tokio:: runtime:: Handle :: current ( ) . block_on ( self . stop ( ) ) ;
336
+ } ) ;
337
337
}
338
338
}
You can’t perform that action at this time.
0 commit comments