优化订阅机制,需要重新订阅时,取消命令发送后再发送订阅命令 #1273
This commit is contained in:
@@ -153,10 +153,7 @@ public class MobilePositionController {
|
||||
Device device = storager.queryVideoDevice(deviceId);
|
||||
device.setSubscribeCycleForMobilePosition(Integer.parseInt(expires));
|
||||
device.setMobilePositionSubmissionInterval(Integer.parseInt(interval));
|
||||
deviceService.updateDevice(device);
|
||||
if (!deviceService.removeMobilePositionSubscribe(device)) {
|
||||
throw new ControllerException(ErrorCode.ERROR100);
|
||||
}
|
||||
deviceService.updateCustomDevice(device);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -199,7 +199,7 @@ public class DeviceQuery {
|
||||
Runnable runnable = dynamicTask.get(key);
|
||||
if (runnable instanceof ISubscribeTask) {
|
||||
ISubscribeTask subscribeTask = (ISubscribeTask) runnable;
|
||||
subscribeTask.stop();
|
||||
subscribeTask.stop(null);
|
||||
}
|
||||
dynamicTask.stop(key);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user