File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -488,7 +488,17 @@ export class MosHandler {
488488 this . _logger . info ( 'Initializing new device: ' + deviceId )
489489 devicesToAdd [ deviceId ] = device
490490 } else {
491- if ( ! _ . isEqual ( oldDevice . deviceOptions , device . options ) ) {
491+ // elsewhere the oldDevice.deviceOptions has been modified with defaults
492+ const newOptionsWithDefaults = {
493+ ...device . options ,
494+ primary : {
495+ ...device . options . primary ,
496+ heartbeatInterval :
497+ device . options . primary . heartbeatInterval || DEFAULT_MOS_HEARTBEAT_INTERVAL ,
498+ timeout : device . options . primary . timeout || DEFAULT_MOS_TIMEOUT_TIME ,
499+ } ,
500+ }
501+ if ( ! _ . isEqual ( oldDevice . deviceOptions , newOptionsWithDefaults ) ) {
492502 this . _logger . info ( 'Re-initializing device: ' + deviceId )
493503 devicesToRemove [ deviceId ] = true
494504 devicesToAdd [ deviceId ] = device
You can’t perform that action at this time.
0 commit comments