修复 keepalive 重复 触发问题

This commit is contained in:
shikong 2023-10-02 02:44:46 +08:00
parent c19d7cd5eb
commit 20ec4a49f4

View File

@ -45,10 +45,9 @@ public class KeepaliveService {
}
public void unKeepalive(MockingDevice mockingDevice){
ScheduledFuture<?> scheduledFuture = map.get(mockingDevice.getDeviceCode());
ScheduledFuture<?> scheduledFuture = map.remove(mockingDevice.getGbDeviceId());
if(scheduledFuture != null){
scheduledFuture.cancel(true);
}
map.remove(mockingDevice.getDeviceCode());
}
}