Skip to content

Commit

Permalink
cancelReceiveTimeout moved after exception creating
Browse files Browse the repository at this point in the history
  • Loading branch information
abalarev committed Nov 28, 2022
1 parent 825fce4 commit 88135b6
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -531,12 +531,13 @@ private void handleReceiveTimeout() {
logger.setCorrelationId(WithDittoHeaders.getCorrelationId(receivedCommand).orElse(null));
logger.info("Got <{}> after <{}> before an appropriate response arrived.",
ReceiveTimeout.class.getSimpleName(), receiveTimeout);
actorContext.cancelReceiveTimeout();

if (null != timeoutExceptionSupplier) {
final var timeoutException = timeoutExceptionSupplier.get();
actorContext.cancelReceiveTimeout();
handleDittoRuntimeException(timeoutException);
} else {
actorContext.cancelReceiveTimeout();
// This case is a programming error that should not happen at all.
logger.error("Actor does not have a timeout exception supplier." +
" Thus, no DittoRuntimeException could be handled.");
Expand Down

0 comments on commit 88135b6

Please sign in to comment.