mirror of
https://github.com/amnezia-vpn/DefaultVPN.git
synced 2026-05-17 08:36:37 +03:00
fix: add linux reconnection (#2415)
* fix: add linux reconnection * fix: Dbus error, fix race conditional * fix: improve reeconnection * fix: add dns load/unload * feat: catch state changed via check gateway * revert: restore linuxfirewall.cpp * fix: restore reconnect time * fix: add NM_STATE_DISABLED and check getGatewayAndIface more carefully * fix: reconnect * fix: revert wireguardutilslinux * fix: revert
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
enum NMState {
|
||||
NM_STATE_UNKNOWN = 0,
|
||||
NM_STATE_ASLEEP = 10,
|
||||
NM_STATE_DISABLED = 10,
|
||||
NM_STATE_DISCONNECTED = 20,
|
||||
NM_STATE_DISCONNECTING = 30,
|
||||
NM_STATE_CONNECTING = 40,
|
||||
@@ -199,10 +200,11 @@ void LinuxNetworkWatcherWorker::checkDevices() {
|
||||
|
||||
void LinuxNetworkWatcherWorker::NMStateChanged(quint32 state)
|
||||
{
|
||||
if (state == NM_STATE_ASLEEP) {
|
||||
emit wakeup();
|
||||
}
|
||||
|
||||
logger.debug() << "NMStateChanged " << state;
|
||||
}
|
||||
logger.debug() << "NMStateChanged " << state;
|
||||
|
||||
if (state == NM_STATE_ASLEEP || state == NM_STATE_DISABLED) {
|
||||
emit wakeup();
|
||||
} else if (state == NM_STATE_CONNECTED_GLOBAL) {
|
||||
emit networkChanged();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user