File tree Expand file tree Collapse file tree
sdk-core/src/main/java/dev/restate/sdk/core Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -419,17 +419,14 @@ public void pollAsyncResult(AsyncResultInternal<?> asyncResult) {
419419
420420 private void pollAsyncResultInner (AsyncResultInternal <?> asyncResult ) {
421421 while (true ) {
422- if (this .stateMachine .state () == StateMachine .InvocationState .CLOSED ) {
423- asyncResult .publicFuture ().completeExceptionally (AbortedExecutionException .INSTANCE );
424- return ;
425- }
426-
427422 // Let's start by trying to complete it
428423 try {
429424 asyncResult .tryComplete (this ::takeNotification );
430425 } catch (Throwable e ) {
431426 // This can happen if the state machine was closed in the meantime.
432- failWithoutContextSwitch (e );
427+ if (!ExceptionUtils .containsAbortedExecutionException (e )) {
428+ this .failWithoutContextSwitch (e );
429+ }
433430 asyncResult .publicFuture ().completeExceptionally (AbortedExecutionException .INSTANCE );
434431 return ;
435432 }
You can’t perform that action at this time.
0 commit comments