Merge branch 'master' into 重构/1078
This commit is contained in:
@@ -231,7 +231,7 @@ public class JwtUtils implements InitializingBean {
|
||||
if (expirationTime != null) {
|
||||
// 判断是否即将过期, 默认剩余时间小于5分钟未即将过期
|
||||
// 剩余时间 (秒)
|
||||
long timeRemaining = LocalDateTime.now().toEpochSecond(ZoneOffset.ofHours(8)) - expirationTime.getValue();
|
||||
long timeRemaining = expirationTime.getValue() - LocalDateTime.now().toEpochSecond(ZoneOffset.ofHours(8));
|
||||
if (timeRemaining < 5 * 60) {
|
||||
jwtUser.setStatus(JwtUser.TokenStatus.EXPIRING_SOON);
|
||||
} else {
|
||||
|
||||
@@ -243,7 +243,7 @@ public class SIPCommanderForPlatform implements ISIPCommanderForPlatform {
|
||||
if (sendAfterResponse) {
|
||||
// 默认按照收到200回复后发送下一条, 如果超时收不到回复,就以30毫秒的间隔直接发送。
|
||||
sipSender.transmitRequest(parentPlatform.getDeviceIp(), request, eventResult -> {
|
||||
if (eventResult.type.equals(SipSubscribe.EventResultType.timeout)) {
|
||||
if (eventResult.statusCode == -1024) {
|
||||
// 消息发送超时, 以30毫秒的间隔直接发送
|
||||
int indexNext = index + parentPlatform.getCatalogGroup();
|
||||
try {
|
||||
@@ -266,8 +266,7 @@ public class SIPCommanderForPlatform implements ISIPCommanderForPlatform {
|
||||
});
|
||||
}else {
|
||||
sipSender.transmitRequest(parentPlatform.getDeviceIp(), request, eventResult -> {
|
||||
log.error("[目录推送失败] 国标级联 platform : {}, code: {}, msg: {}, 停止发送", parentPlatform.getServerGBId(), eventResult.statusCode, eventResult.msg);
|
||||
dynamicTask.stop(timeoutTaskKey);
|
||||
log.error("[目录推送失败] 国标级联 platform : {}, code: {}, msg: {}", parentPlatform.getServerGBId(), eventResult.statusCode, eventResult.msg);
|
||||
}, null);
|
||||
dynamicTask.startDelay(timeoutTaskKey, ()->{
|
||||
int indexNext = index + parentPlatform.getCatalogGroup();
|
||||
|
||||
Reference in New Issue
Block a user