Commit 28e060fd6f7377c3cbb1c8633a6ac9b8fd61cbcb
1 parent
a74fb6ec
修复空指针异常
Showing
1 changed file
with
1 additions
and
1 deletions
src/main/java/com/genersoft/iot/vmp/service/impl/PlatformServiceImpl.java
| ... | ... | @@ -149,7 +149,7 @@ public class PlatformServiceImpl implements IPlatformService { |
| 149 | 149 | dynamicTask.stop(registerTaskKey); |
| 150 | 150 | // 注销旧的 |
| 151 | 151 | try { |
| 152 | - if (parentPlatformOld.isStatus()) { | |
| 152 | + if (parentPlatformOld.isStatus() && parentPlatformCatchOld != null) { | |
| 153 | 153 | logger.info("保存平台{}时发现旧平台在线,发送注销命令", parentPlatformOld.getServerGBId()); |
| 154 | 154 | commanderForPlatform.unregister(parentPlatformOld, parentPlatformCatchOld.getSipTransactionInfo(), null, eventResult -> { |
| 155 | 155 | logger.info("[国标级联] 注销成功, 平台:{}", parentPlatformOld.getServerGBId()); | ... | ... |