|
@@ -138,6 +138,10 @@ public class MysqlMultiStageCoprocessor extends AbstractCanalLifeCycle implement
|
|
try {
|
|
try {
|
|
parserExecutor.shutdownNow();
|
|
parserExecutor.shutdownNow();
|
|
while (!parserExecutor.awaitTermination(1, TimeUnit.SECONDS)) {
|
|
while (!parserExecutor.awaitTermination(1, TimeUnit.SECONDS)) {
|
|
|
|
+ if (parserExecutor.isShutdown() || parserExecutor.isTerminated()) {
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+
|
|
parserExecutor.shutdownNow();
|
|
parserExecutor.shutdownNow();
|
|
}
|
|
}
|
|
} catch (Throwable e) {
|
|
} catch (Throwable e) {
|
|
@@ -147,6 +151,10 @@ public class MysqlMultiStageCoprocessor extends AbstractCanalLifeCycle implement
|
|
try {
|
|
try {
|
|
stageExecutor.shutdownNow();
|
|
stageExecutor.shutdownNow();
|
|
while (!stageExecutor.awaitTermination(1, TimeUnit.SECONDS)) {
|
|
while (!stageExecutor.awaitTermination(1, TimeUnit.SECONDS)) {
|
|
|
|
+ if (stageExecutor.isShutdown() || stageExecutor.isTerminated()) {
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+
|
|
stageExecutor.shutdownNow();
|
|
stageExecutor.shutdownNow();
|
|
}
|
|
}
|
|
} catch (Throwable e) {
|
|
} catch (Throwable e) {
|