File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
client/src/main/java/com/microsoft/durabletask Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -71,11 +71,16 @@ public final class DurableTaskGrpcClient extends DurableTaskClient {
7171 public void close () {
7272 if (this .managedSidecarChannel != null ) {
7373 try {
74- this .managedSidecarChannel .shutdown ().awaitTermination (5 , TimeUnit .SECONDS );
74+ if (!this .managedSidecarChannel .shutdown ().awaitTermination (5 , TimeUnit .SECONDS ))
75+ {
76+ this .managedSidecarChannel .shutdownNow ();
77+ }
7578 } catch (InterruptedException e ) {
7679 // Best effort. Also note that AutoClose documentation recommends NOT having
7780 // close() methods throw InterruptedException:
7881 // https://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html
82+ this .managedSidecarChannel .shutdownNow ();
83+ Thread .currentThread ().interrupt ();
7984 }
8085 }
8186 }
You can’t perform that action at this time.
0 commit comments