Skip to content

Commit

Permalink
fix-biz-stop (#414)
Browse files Browse the repository at this point in the history
  • Loading branch information
glmapper authored Oct 14, 2020
1 parent 1250449 commit 92ed30b
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,13 @@ public static ClientResponse installBiz(File bizFile, String[] args) throws Thro
response.setCode(ResponseCode.FAILED).setMessage(
String.format("Install Biz: %s fail.", biz.getIdentity()));
LOGGER.error(response.getMessage(), throwable);

bizManagerService.unRegisterBizStrictly(biz.getBizName(), biz.getBizVersion());
try {
biz.stop();
} catch (Throwable e) {
LOGGER.error(String.format("UnInstall Biz: %s fail.", biz.getIdentity()), e);
throw e;
} finally {
bizManagerService.unRegisterBizStrictly(biz.getBizName(), biz.getBizVersion());
}
return response;
}
Expand Down Expand Up @@ -213,6 +213,8 @@ public static ClientResponse uninstallBiz(String bizName, String bizVersion) thr
LOGGER
.error(String.format("UnInstall Biz: %s fail.", biz.getIdentity()), throwable);
throw throwable;
} finally {
bizManagerService.unRegisterBizStrictly(biz.getBizName(), biz.getBizVersion());
}
response.setCode(ResponseCode.SUCCESS).setMessage(
String.format("Uninstall biz: %s success.", biz.getIdentity()));
Expand Down

0 comments on commit 92ed30b

Please sign in to comment.