Commit a6f9c090cb73f4ae97c40401068216a0b3fcb97d
1 parent
6a5ab117
重启服务时上级平台直接注销再注册
Showing
1 changed file
with
5 additions
and
10 deletions
src/main/java/com/genersoft/iot/vmp/conf/SipPlatformRunner.java
| ... | ... | @@ -46,17 +46,12 @@ public class SipPlatformRunner implements CommandLineRunner { |
| 46 | 46 | parentPlatformCatch.setParentPlatform(parentPlatform); |
| 47 | 47 | parentPlatformCatch.setId(parentPlatform.getServerGBId()); |
| 48 | 48 | redisCatchStorage.updatePlatformCatchInfo(parentPlatformCatch); |
| 49 | - if (parentPlatform.isStatus()) { | |
| 50 | - // 设置所有平台离线 | |
| 51 | - platformService.offline(parentPlatform); | |
| 52 | - // 取消订阅 | |
| 53 | - sipCommanderForPlatform.unregister(parentPlatform, null, (eventResult)->{ | |
| 54 | - platformService.login(parentPlatform); | |
| 55 | - }); | |
| 56 | - }else { | |
| 49 | + // 设置所有平台离线 | |
| 50 | + platformService.offline(parentPlatform); | |
| 51 | + // 取消订阅 | |
| 52 | + sipCommanderForPlatform.unregister(parentPlatform, null, (eventResult)->{ | |
| 57 | 53 | platformService.login(parentPlatform); |
| 58 | - } | |
| 59 | - | |
| 54 | + }); | |
| 60 | 55 | } |
| 61 | 56 | } |
| 62 | 57 | } | ... | ... |