|
@@ -25,7 +25,7 @@ func DealWithOffline() {
|
|
|
regions, _ := utils.LoadData()
|
|
|
for i, region := range regions {
|
|
|
for i2, device := range region.Devices {
|
|
|
- if time.Now().After(device.OnlineTime.Add(4 * time.Minute)) {
|
|
|
+ if time.Now().After(device.OnlineTime.Add(4*time.Minute)) && regions[i].Devices[i2].State != 0 {
|
|
|
regions[i].Devices[i2].State = 0
|
|
|
}
|
|
|
}
|