File tree Expand file tree Collapse file tree
crates/nym-offline-monitor/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2222### Fixed
2323
2424- [ Android] Diagnostic doesn't panic because of uninitialized context (https://github.com/nymtech/nym-vpn-client/pull/5415 )
25-
25+ - [ Windows ] Fix a crash when the network reconnected ( https://github.com/nymtech/nym-vpn-client/pull/5508 )
2626
2727## [ 1.30] - 2026-05-29
2828
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ impl BroadcastListener {
5353 } ,
5454 notify_tx,
5555 pending_online_cancel : None ,
56+ rt_handle : tokio:: runtime:: Handle :: current ( ) ,
5657 } ) ) ;
5758
5859 let state = system_state. clone ( ) ;
@@ -183,8 +184,12 @@ enum StateChange {
183184struct SystemState {
184185 connectivity : ConnectivityInner ,
185186 notify_tx : watch:: Sender < Connectivity > ,
187+
186188 /// Cancels a pending "Connected" notification during the stabilisation delay.
187189 pending_online_cancel : Option < CancellationToken > ,
190+
191+ /// Tokio runtime handle to run callbacks in
192+ rt_handle : tokio:: runtime:: Handle ,
188193}
189194
190195impl SystemState {
@@ -222,7 +227,7 @@ impl SystemState {
222227 self . pending_online_cancel = Some ( cancel. clone ( ) ) ;
223228 let notify_tx = self . notify_tx . clone ( ) ;
224229 let online_connectivity = self . connectivity . into_connectivity ( ) ;
225- tokio :: spawn ( async move {
230+ self . rt_handle . spawn ( async move {
226231 tokio:: select! {
227232 _ = tokio:: time:: sleep( ONLINE_STABILIZATION_DELAY ) => {
228233 tracing:: info!( "Connectivity changed: Connected" ) ;
You can’t perform that action at this time.
0 commit comments