重启服务时上级平台直接注销再注册

This commit is contained in:
648540858 2022-09-08 10:50:44 +08:00
parent 6a5ab117f5
commit a6f9c090cb

View File

@ -46,17 +46,12 @@ public class SipPlatformRunner implements CommandLineRunner {
parentPlatformCatch.setParentPlatform(parentPlatform);
parentPlatformCatch.setId(parentPlatform.getServerGBId());
redisCatchStorage.updatePlatformCatchInfo(parentPlatformCatch);
if (parentPlatform.isStatus()) {
// 设置所有平台离线
platformService.offline(parentPlatform);
// 取消订阅
sipCommanderForPlatform.unregister(parentPlatform, null, (eventResult)->{
platformService.login(parentPlatform);
});
}else {
// 设置所有平台离线
platformService.offline(parentPlatform);
// 取消订阅
sipCommanderForPlatform.unregister(parentPlatform, null, (eventResult)->{
platformService.login(parentPlatform);
}
});
}
}
}