Skip to content

Commit

Permalink
Option to send logout after SequenceReset
Browse files Browse the repository at this point in the history
  • Loading branch information
denis.plotnikov committed Dec 12, 2024
1 parent 373d07d commit d631dda
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/main/java/com/exactpro/th2/FixHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -2328,11 +2328,13 @@ private void runReconnectWithSequenceResetStrategy(RuleConfiguration configurati

ChangeSequenceConfiguration resendRequestConfig = configuration.getChangeSequenceConfiguration();

try {
disconnect(configuration.getGracefulDisconnect());
} catch (Exception e) {
String message = String.format("Error while cleaning up %s strategy", strategy.getType());
LOGGER.error(message, e);
if(!resendRequestConfig.getSendLogoutAfterReset()) {
try {
disconnect(configuration.getGracefulDisconnect());
} catch (Exception e) {
String message = String.format("Error while cleaning up %s strategy", strategy.getType());
LOGGER.error(message, e);
}
}

if(resendRequestConfig.getChangeIncomingSequence()) {
Expand All @@ -2351,8 +2353,7 @@ private void runReconnectWithSequenceResetStrategy(RuleConfiguration configurati

if(resendRequestConfig.getSendLogoutAfterReset()) {
try {
openChannelAndWaitForLogon();
sendLogout();
disconnect(configuration.getGracefulDisconnect());
} catch (Exception e) {
String message = String.format("Error while cleaning up %s strategy", strategy.getType());
LOGGER.error(message, e);
Expand Down

0 comments on commit d631dda

Please sign in to comment.