File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
client/src/main/java/com/microsoft/durabletask Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ public final class DurableTaskGrpcWorker implements AutoCloseable {
3737 private final ExecutorService workerPool ;
3838
3939 private final TaskHubSidecarServiceBlockingStub sidecarClient ;
40+ private volatile boolean isNormalShutdown = false ;
4041
4142 DurableTaskGrpcWorker (DurableTaskGrpcWorkerBuilder builder ) {
4243 this .orchestrationFactories .putAll (builder .orchestrationFactories );
@@ -218,6 +219,7 @@ public void startAndBlock() {
218219 * Stops the current worker's listen loop, preventing any new orchestrator or activity events from being processed.
219220 */
220221 public void stop () {
222+ this .isNormalShutdown = true ;
221223 this .close ();
222224 }
223225
@@ -234,7 +236,9 @@ private void closeSideCarChannel() {
234236 }
235237
236238 private void shutDownWorkerPool () {
237- logger .log (Level .WARNING , "ExecutorService shutdown initiated. No new tasks will be accepted" );
239+ if (!this .isNormalShutdown ) {
240+ logger .log (Level .WARNING , "ExecutorService shutdown initiated unexpectedly. No new tasks will be accepted" );
241+ }
238242
239243 this .workerPool .shutdown ();
240244 try {
You can’t perform that action at this time.
0 commit comments