Adjust timeout passed since device creation time check to be not strict
This commit is contained in:
parent
06eb44a23f
commit
5e6dd652d7
@ -487,7 +487,7 @@ public class DefaultDeviceStateService extends AbstractPartitionBasedService<Dev
|
||||
DeviceState state = stateData.getState();
|
||||
if (!isActive(ts, state)
|
||||
&& (state.getLastInactivityAlarmTime() == 0L || state.getLastInactivityAlarmTime() <= state.getLastActivityTime())
|
||||
&& stateData.getDeviceCreationTime() + state.getInactivityTimeout() < ts) {
|
||||
&& stateData.getDeviceCreationTime() + state.getInactivityTimeout() <= ts) {
|
||||
if (partitionService.resolve(ServiceType.TB_CORE, stateData.getTenantId(), deviceId).isMyPartition()) {
|
||||
state.setActive(false);
|
||||
state.setLastInactivityAlarmTime(ts);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user