File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
sdk-core/src/main/java/dev/restate/sdk/core Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -410,17 +410,15 @@ private void pollAsyncResultInner(AsyncResultInternal<?> asyncResult) {
410410
411411 if (response instanceof StateMachine .DoProgressResponse .AnyCompleted ) {
412412 // Let it loop now
413- } else if (response instanceof StateMachine .DoProgressResponse .ReadFromInput ) {
414- this .stateMachine
415- .waitNextInputSignal ()
413+ } else if (response instanceof StateMachine .DoProgressResponse .ReadFromInput
414+ || response instanceof StateMachine .DoProgressResponse .WaitingPendingRun ) {
415+ CompletableFuture .anyOf (
416+ this .waitNextProcessedRun (), this .stateMachine .waitNextInputSignal ())
416417 .thenAccept (v -> this .pollAsyncResultInner (asyncResult ));
417418 return ;
418419 } else if (response instanceof StateMachine .DoProgressResponse .ExecuteRun ) {
419420 triggerScheduledRun (((StateMachine .DoProgressResponse .ExecuteRun ) response ).handle ());
420421 // Let it loop now
421- } else if (response instanceof StateMachine .DoProgressResponse .WaitingPendingRun ) {
422- this .waitNextProcessedRun ().thenAccept (v -> this .pollAsyncResultInner (asyncResult ));
423- return ;
424422 }
425423 }
426424 }
You can’t perform that action at this time.
0 commit comments