mirror of
https://github.com/netbirdio/netbird.git
synced 2025-08-09 23:27:58 +02:00
Fix/always on boot (#1062)
In case of 'always-on' feature has switched on, after the reboot the service do not start properly in all cases. If the device is in offline state (no internet connection) the auth login steps will fail and the service will stop. For the auth steps make no sense in this case because if the OS start the service we do not have option for the user interaction.
This commit is contained in:
@ -61,7 +61,7 @@ func (n *notifier) clientStart() {
|
||||
n.serverStateLock.Lock()
|
||||
defer n.serverStateLock.Unlock()
|
||||
n.currentClientState = true
|
||||
n.lastNotification = stateConnected
|
||||
n.lastNotification = stateConnecting
|
||||
n.notify(n.lastNotification)
|
||||
}
|
||||
|
||||
@ -114,7 +114,7 @@ func (n *notifier) calculateState(managementConn, signalConn bool) int {
|
||||
return stateConnected
|
||||
}
|
||||
|
||||
if !managementConn && !signalConn {
|
||||
if !managementConn && !signalConn && !n.currentClientState {
|
||||
return stateDisconnected
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user