Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Plotnikov committed Nov 29, 2023
1 parent 9bfc571 commit 8786cb1
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/main/java/com/exactpro/th2/FixHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,11 @@ private Map<String, String> handleLogon(@NotNull ByteBuf message, Map<String, St
recoveryLock.lock();
activeRecovery.set(true);
Thread.sleep(settings.getCradleSaveTimeoutMs());
strategy.getRecoveryHandler().recovery(nextExpectedSeqNumber, seqNum);
if(!channel.isOpen()) {
LOGGER.warn("Recovery is interrupted.");
} else {
strategy.getRecoveryHandler().recovery(nextExpectedSeqNumber, seqNum);
}
} catch (InterruptedException e) {
LOGGER.error("Error while waiting for cradle save timeout.", e);
} finally {
Expand Down Expand Up @@ -787,7 +791,11 @@ private void handleResendRequest(ByteBuf message) {
recoveryLock.lock();
activeRecovery.set(true);
Thread.sleep(settings.getCradleSaveTimeoutMs());
strategy.getRecoveryHandler().recovery(beginSeqNo, endSeqNo);
if(!channel.isOpen()) {
LOGGER.warn("Recovery is interrupted.");
} else {
strategy.getRecoveryHandler().recovery(beginSeqNo, endSeqNo);
}
} catch (InterruptedException e) {
LOGGER.error("Error while waiting for cradle save timeout.", e);
} finally {
Expand Down

0 comments on commit 8786cb1

Please sign in to comment.