From 33d4107d0c1776d730d84998c42b29933673525f Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Wed, 6 Sep 2023 10:21:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=90=AF=E5=8A=A8=E6=97=B6?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E4=B8=8A=E6=9C=BA=E5=B9=B3=E5=8F=B0=E4=B8=8D?= =?UTF-8?q?=E5=8F=AF=E8=BF=9E=E6=8E=A5=E7=9A=84=E5=AF=BC=E8=87=B4=E7=9A=84?= =?UTF-8?q?=E6=8C=81=E7=BB=AD=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/genersoft/iot/vmp/conf/SipPlatformRunner.java | 7 +++---- .../iot/vmp/service/impl/PlatformServiceImpl.java | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/conf/SipPlatformRunner.java b/src/main/java/com/genersoft/iot/vmp/conf/SipPlatformRunner.java index b58b91c5..7760bddf 100644 --- a/src/main/java/com/genersoft/iot/vmp/conf/SipPlatformRunner.java +++ b/src/main/java/com/genersoft/iot/vmp/conf/SipPlatformRunner.java @@ -14,9 +14,6 @@ import org.springframework.boot.CommandLineRunner; import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; -import javax.sip.InvalidArgumentException; -import javax.sip.SipException; -import java.text.ParseException; import java.util.List; /** @@ -61,8 +58,10 @@ public class SipPlatformRunner implements CommandLineRunner { sipCommanderForPlatform.unregister(parentPlatform, parentPlatformCatchOld.getSipTransactionInfo(), null, (eventResult)->{ platformService.login(parentPlatform); }); - } catch (InvalidArgumentException | ParseException | SipException e) { + } catch (Exception e) { logger.error("[命令发送失败] 国标级联 注销: {}", e.getMessage()); + platformService.offline(parentPlatform, true); + continue; } } diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/PlatformServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/PlatformServiceImpl.java index 86ee0f4f..d295ed4c 100755 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/PlatformServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/PlatformServiceImpl.java @@ -276,7 +276,7 @@ public class PlatformServiceImpl implements IPlatformService { eventResult.statusCode, eventResult.msg); offline(parentPlatform, false); }, null); - } catch (InvalidArgumentException | ParseException | SipException e) { + } catch (Exception e) { logger.error("[命令发送失败] 国标级联定时注册: {}", e.getMessage()); } }