设备心跳
This commit is contained in:
parent
ee9b8ce08c
commit
2c973673d0
@ -24,7 +24,7 @@ public class KeepaliveService {
|
||||
|
||||
public void keepalive(MockingDevice mockingDevice){
|
||||
unKeepalive(mockingDevice);
|
||||
scheduledExecutorService.scheduleWithFixedDelay(()->{
|
||||
ScheduledFuture<?> scheduledFuture = scheduledExecutorService.scheduleWithFixedDelay(() -> {
|
||||
KeepaliveNotifyDTO keepaliveNotifyDTO = KeepaliveNotifyDTO.builder()
|
||||
.deviceId(mockingDevice.getGbDeviceId())
|
||||
.sn(String.valueOf((int) ((Math.random() * 9 + 1) * 100000)))
|
||||
@ -40,7 +40,8 @@ public class KeepaliveService {
|
||||
SipUtil.generateFromTag(),
|
||||
callIdHeader);
|
||||
});
|
||||
},0,30, TimeUnit.SECONDS);
|
||||
}, 0, 30, TimeUnit.SECONDS);
|
||||
map.put(mockingDevice.getGbDeviceId(), scheduledFuture);
|
||||
}
|
||||
|
||||
public void unKeepalive(MockingDevice mockingDevice){
|
||||
|
Loading…
Reference in New Issue
Block a user