[fix]解决线程池被关闭后仍提交任务的问题

This commit is contained in:
chenfufeng
2023-05-18 16:23:02 +08:00
parent b0446402be
commit 52426fec6e
2 changed files with 12 additions and 12 deletions

View File

@@ -117,7 +117,7 @@ public class DiscoveryDriverTask extends AbstractDiscoveryTask {
}
private void launch(long i) {
if (!mPool.isShutdown()) {
if (!mPool.isShutdown() && !isCancelled()) {
mPool.execute(new CheckRunnable(NetInfo.getIpFromLongUnsigned(i)));
}
}