Skip to content

Commit

Permalink
feature:close and shutdown (opengoofy#1103)
Browse files Browse the repository at this point in the history
  • Loading branch information
zjHe authored Mar 14, 2023
1 parent fd6b4a3 commit 0e87fff
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ public void destroy() throws Exception {
String clientCloseUrlPath = Constants.BASE_PATH + "/client/close";
Result clientCloseResult;
try {
// close scheduledExecutor
this.scheduler.shutdown();
String groupKeyIp = new StringBuilder()
.append(instanceInfo.getGroupKey())
.append(Constants.GROUP_KEY_DELIMITER)
Expand Down Expand Up @@ -126,6 +128,9 @@ public void run() {
private boolean renew() {
Result renewResult;
try {
if (this.scheduler.isShutdown()) {
return false;
}
InstanceInfo.InstanceRenew instanceRenew = new InstanceInfo.InstanceRenew()
.setAppName(instanceInfo.getAppName())
.setInstanceId(instanceInfo.getInstanceId())
Expand Down

0 comments on commit 0e87fff

Please sign in to comment.