mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-25 00:11:06 +00:00
Don't start connectivity check when in offlineMode
Change-type: patch Signed-off-by: Cameron Diver <cameron@balena.io>
This commit is contained in:
parent
ce543d820f
commit
2e80b49da1
@ -168,7 +168,7 @@ module.exports = class DeviceState extends EventEmitter
|
||||
@config.getMany([
|
||||
'initialConfigSaved', 'listenPort', 'apiSecret', 'osVersion', 'osVariant',
|
||||
'version', 'provisioned', 'apiEndpoint', 'connectivityCheckEnabled', 'legacyAppsPresent',
|
||||
'targetStateSet'
|
||||
'targetStateSet', 'offlineMode'
|
||||
])
|
||||
.then (conf) =>
|
||||
Promise.try =>
|
||||
@ -214,7 +214,8 @@ module.exports = class DeviceState extends EventEmitter
|
||||
.then =>
|
||||
@triggerApplyTarget({ initial: true })
|
||||
|
||||
initNetworkChecks: ({ apiEndpoint, connectivityCheckEnabled }) =>
|
||||
initNetworkChecks: ({ apiEndpoint, connectivityCheckEnabled, offlineMode }) =>
|
||||
return if validation.checkTruthy(offlineMode)
|
||||
network.startConnectivityCheck apiEndpoint, connectivityCheckEnabled, (connected) =>
|
||||
@connected = connected
|
||||
@config.on 'change', (changedConfig) ->
|
||||
|
Loading…
Reference in New Issue
Block a user