Skip to content

Commit

Permalink
fix: update state on state machine stop
Browse files Browse the repository at this point in the history
  • Loading branch information
zaneschepke committed Jan 24, 2025
1 parent 83cd945 commit 03a9e4c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ class NymBackend private constructor(val context: Context) : Backend, TunnelStat
} catch (e: VpnException) {
runCatching {
forgetAccount()
}.onFailure {
Timber.e(e)
}
throw e
}
Expand Down Expand Up @@ -297,6 +299,7 @@ class NymBackend private constructor(val context: Context) : Backend, TunnelStat
}.onFailure {
Timber.e(it)
}
onStateChange(Tunnel.State.Down)
}
}

Expand Down Expand Up @@ -353,7 +356,7 @@ class NymBackend private constructor(val context: Context) : Backend, TunnelStat
private fun startNetworkStatusMonitor() = lifecycleScope.launch {
NetworkConnectivityService(this@StateMachineService).networkStatus.collect {
Timber.d("New network event: $it")
owner?.onNetworkStatusChange(it) ?: Timber.w("OWNER IS NULL!!")
owner?.onNetworkStatusChange(it)
}
}

Expand Down

0 comments on commit 03a9e4c

Please sign in to comment.