修复平台删除时未移除心跳超时重新注册任务的问题 #1329
parent
e932a9b824
commit
38980826f9
|
@ -7,7 +7,6 @@ import com.genersoft.iot.vmp.gb28181.bean.*;
|
||||||
import com.genersoft.iot.vmp.gb28181.event.SipSubscribe;
|
import com.genersoft.iot.vmp.gb28181.event.SipSubscribe;
|
||||||
import com.genersoft.iot.vmp.gb28181.session.SSRCFactory;
|
import com.genersoft.iot.vmp.gb28181.session.SSRCFactory;
|
||||||
import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommanderFroPlatform;
|
import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommanderFroPlatform;
|
||||||
import com.genersoft.iot.vmp.gb28181.utils.SipUtils;
|
|
||||||
import com.genersoft.iot.vmp.media.zlm.ZLMServerFactory;
|
import com.genersoft.iot.vmp.media.zlm.ZLMServerFactory;
|
||||||
import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem;
|
import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem;
|
||||||
import com.genersoft.iot.vmp.service.IMediaServerService;
|
import com.genersoft.iot.vmp.service.IMediaServerService;
|
||||||
|
@ -18,22 +17,18 @@ import com.genersoft.iot.vmp.storager.dao.*;
|
||||||
import com.genersoft.iot.vmp.utils.DateUtil;
|
import com.genersoft.iot.vmp.utils.DateUtil;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import gov.nist.javax.sip.message.SIPRequest;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.sip.InvalidArgumentException;
|
import javax.sip.InvalidArgumentException;
|
||||||
import javax.sip.PeerUnavailableException;
|
|
||||||
import javax.sip.SipException;
|
import javax.sip.SipException;
|
||||||
import javax.sip.SipFactory;
|
|
||||||
import javax.sip.address.Address;
|
|
||||||
import javax.sip.address.SipURI;
|
|
||||||
import javax.sip.header.*;
|
|
||||||
import javax.sip.message.Request;
|
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.util.*;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author lin
|
* @author lin
|
||||||
|
@ -366,7 +361,6 @@ public class PlatformServiceImpl implements IPlatformService {
|
||||||
()-> registerTask(platform, null),
|
()-> registerTask(platform, null),
|
||||||
userSetting.getRegisterAgainAfterTime() * 1000);
|
userSetting.getRegisterAgainAfterTime() * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -239,6 +239,8 @@ public class PlatformController {
|
||||||
if (parentPlatformCatch == null) {
|
if (parentPlatformCatch == null) {
|
||||||
throw new ControllerException(ErrorCode.ERROR100.getCode(), "平台不存在");
|
throw new ControllerException(ErrorCode.ERROR100.getCode(), "平台不存在");
|
||||||
}
|
}
|
||||||
|
parentPlatform.setEnable(false);
|
||||||
|
storager.updateParentPlatform(parentPlatform);
|
||||||
// 发送离线消息,无论是否成功都删除缓存
|
// 发送离线消息,无论是否成功都删除缓存
|
||||||
try {
|
try {
|
||||||
commanderForPlatform.unregister(parentPlatform, parentPlatformCatch.getSipTransactionInfo(), (event -> {
|
commanderForPlatform.unregister(parentPlatform, parentPlatformCatch.getSipTransactionInfo(), (event -> {
|
||||||
|
|
Loading…
Reference in New Issue