Browse Source

修复订阅清理请示任务的执行时长

pull/212/head
648540858 3 years ago
parent
commit
b445128fb5
  1. 2
      src/main/java/com/genersoft/iot/vmp/conf/security/LoginFailureHandler.java
  2. 2
      src/main/java/com/genersoft/iot/vmp/gb28181/event/SipSubscribe.java
  3. 2
      src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/RegisterRequestProcessor.java

2
src/main/java/com/genersoft/iot/vmp/conf/security/LoginFailureHandler.java

@ -34,7 +34,7 @@ public class LoginFailureHandler implements AuthenticationFailureHandler {
} else if (e instanceof BadCredentialsException) { } else if (e instanceof BadCredentialsException) {
// 密码错误 // 密码错误
logger.info("[登录失败] - 用户[{}]密码错误", username); logger.info("[登录失败] - 用户[{}]密码/SIP服务器ID 错误", username);
} else if (e instanceof CredentialsExpiredException) { } else if (e instanceof CredentialsExpiredException) {
// 密码过期 // 密码过期

2
src/main/java/com/genersoft/iot/vmp/gb28181/event/SipSubscribe.java

@ -24,7 +24,7 @@ public class SipSubscribe {
private Map<String, Date> timeSubscribes = new ConcurrentHashMap<>(); private Map<String, Date> timeSubscribes = new ConcurrentHashMap<>();
// @Scheduled(cron="*/5 * * * * ?") //每五秒执行一次 // @Scheduled(cron="*/5 * * * * ?") //每五秒执行一次
@Scheduled(cron="0 * */1 * * ?") //每小时执行一次 @Scheduled(cron="0 0 * * * ?") //每小时执行一次, 每个整点
public void execute(){ public void execute(){
logger.info("[定时任务] 清理过期的订阅信息"); logger.info("[定时任务] 清理过期的订阅信息");
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();

2
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/RegisterRequestProcessor.java

@ -96,7 +96,7 @@ public class RegisterRequestProcessor extends SIPRequestAbstractProcessor {
// 注册失败 // 注册失败
response = getMessageFactory().createResponse(Response.FORBIDDEN, request); response = getMessageFactory().createResponse(Response.FORBIDDEN, request);
response.setReasonPhrase("wrong password"); response.setReasonPhrase("wrong password");
logger.info("[{}] 密码错误 回复403", requestAddress); logger.info("[{}] 密码/SIP服务器ID错误, 回复403", requestAddress);
}else { }else {
// 携带授权头并且密码正确 // 携带授权头并且密码正确
response = getMessageFactory().createResponse(Response.OK, request); response = getMessageFactory().createResponse(Response.OK, request);

Loading…
Cancel
Save