Commit cef04a8b5acdbe1d086fdc45d6c4a5b3b8df4a51
Merge remote-tracking branch 'origin/wvp-28181-2.0' into wvp-28181-2.0
Showing
1 changed file
with
7 additions
and
4 deletions
src/main/java/com/genersoft/iot/vmp/conf/SipPlatformRunner.java
| @@ -48,10 +48,13 @@ public class SipPlatformRunner implements CommandLineRunner { | @@ -48,10 +48,13 @@ public class SipPlatformRunner implements CommandLineRunner { | ||
| 48 | parentPlatformCatch.setParentPlatform(parentPlatform); | 48 | parentPlatformCatch.setParentPlatform(parentPlatform); |
| 49 | parentPlatformCatch.setId(parentPlatform.getServerGBId()); | 49 | parentPlatformCatch.setId(parentPlatform.getServerGBId()); |
| 50 | redisCatchStorage.updatePlatformCatchInfo(parentPlatformCatch); | 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 | platformService.offline(parentPlatform, true); | 59 | platformService.offline(parentPlatform, true); |
| 57 | } | 60 | } |