diff --git a/src/main/java/com/exactpro/th2/FixHandler.java b/src/main/java/com/exactpro/th2/FixHandler.java index 1cb05af..42a25a1 100644 --- a/src/main/java/com/exactpro/th2/FixHandler.java +++ b/src/main/java/com/exactpro/th2/FixHandler.java @@ -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()) { @@ -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);