修复因为心跳重发导致的心跳间隔异常

pull/952/head
648540858 2023-07-14 09:10:59 +08:00
parent ef5018de2d
commit 4162706ec4
1 changed files with 3 additions and 1 deletions

View File

@ -78,8 +78,10 @@ public class KeepaliveNotifyMessageHandler extends SIPRequestProcessorParent imp
device.setKeepaliveIntervalTime(60);
}else {
long lastTime = DateUtil.yyyy_MM_dd_HH_mm_ssToTimestamp(device.getKeepaliveTime());
if (System.currentTimeMillis()/1000-lastTime > 10) {
device.setKeepaliveIntervalTime(new Long(System.currentTimeMillis()/1000-lastTime).intValue());
}
}
device.setKeepaliveTime(DateUtil.getNow());