Commit 15f718bd646d6566ca9c4e702dc5985198565efd

Authored by 648540858
1 parent e3d7be9d

修复空指针异常 #813

src/main/java/com/genersoft/iot/vmp/conf/SipPlatformRunner.java
... ... @@ -48,10 +48,13 @@ public class SipPlatformRunner implements CommandLineRunner {
48 48 parentPlatformCatch.setParentPlatform(parentPlatform);
49 49 parentPlatformCatch.setId(parentPlatform.getServerGBId());
50 50 redisCatchStorage.updatePlatformCatchInfo(parentPlatformCatch);
51   - // 取消订阅
52   - sipCommanderForPlatform.unregister(parentPlatform, parentPlatformCatchOld.getSipTransactionInfo(), null, (eventResult)->{
53   - platformService.login(parentPlatform);
54   - });
  51 + if (parentPlatformCatchOld != null) {
  52 + // 取消订阅
  53 + sipCommanderForPlatform.unregister(parentPlatform, parentPlatformCatchOld.getSipTransactionInfo(), null, (eventResult)->{
  54 + platformService.login(parentPlatform);
  55 + });
  56 + }
  57 +
55 58 // 设置所有平台离线
56 59 platformService.offline(parentPlatform, true);
57 60 }
... ...