diff --git a/app/src/main/java/org/unifiedpush/distributor/nextpush/services/RestartNetworkCallback.kt b/app/src/main/java/org/unifiedpush/distributor/nextpush/services/RestartNetworkCallback.kt index 809d5eb..31b1d12 100644 --- a/app/src/main/java/org/unifiedpush/distributor/nextpush/services/RestartNetworkCallback.kt +++ b/app/src/main/java/org/unifiedpush/distributor/nextpush/services/RestartNetworkCallback.kt @@ -33,11 +33,14 @@ class RestartNetworkCallback(val context: Context) : ConnectivityManager.Network RestartWorker.run(context, delay = 0) } // else, it retries in max 2sec } - } else { - hasInternet = false } } + override fun onLost(network: Network) { + Log.d(TAG, "Network unavailable") + hasInternet = false + } + fun register() { if (!registered) { registered = true