Skip to content

Commit

Permalink
bugfix: adjust the timing of closing all threads
Browse files Browse the repository at this point in the history
  • Loading branch information
wardseptember committed Sep 26, 2024
1 parent 9018c10 commit 3673085
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -369,16 +369,16 @@ protected void stopInternal() throws Exception {
}
// 2) wait waitTime before stop service
Thread.sleep(waitTime);
// 3) wait for threads to close
WorkerPoolManager.shutdown(closeTime, TimeUnit.MILLISECONDS);
// 4) service stop, do not accept new requests
// 3) service stop, do not accept new requests
if (serverConfig != null) {
serverConfig.stop();
}
// 5) business-related
// 4) business-related
if (appInitializer != null) {
appInitializer.stop();
}
// 5) wait for threads to close
WorkerPoolManager.shutdown(closeTime, TimeUnit.MILLISECONDS);
// 6) close the client side
clientConfig.stop();
// 7) close plugins
Expand Down

0 comments on commit 3673085

Please sign in to comment.