Skip to content

Commit

Permalink
Clear the container at the end of the DefaultExecutorRepository#destr…
Browse files Browse the repository at this point in the history
…oyAll method (#7820)

* Clear the container at the end of the DefaultExecutorRepository#destroyAll method

* Reuse destroyRegistered variable
  • Loading branch information
BurningCN committed May 22, 2021
1 parent 22ec5a0 commit 03223c7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ public void destroyAll() {
});
}
});

data.clear();
}

private ExecutorService createExecutor(URL url) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ public void destroy() {
}
Set<URL> destroyRegistered = new HashSet<>(getRegistered());
if (!destroyRegistered.isEmpty()) {
for (URL url : new HashSet<>(getRegistered())) {
for (URL url : new HashSet<>(destroyRegistered)) {
if (url.getParameter(DYNAMIC_KEY, true)) {
try {
unregister(url);
Expand Down

0 comments on commit 03223c7

Please sign in to comment.