From 0cfbdf84c0d188049c1d8e9fbad1e0b54cc70221 Mon Sep 17 00:00:00 2001 From: Denis Plotnikov Date: Tue, 21 Nov 2023 12:45:29 +0400 Subject: [PATCH] fix strategy resend request on logon gap --- src/main/java/com/exactpro/th2/FixHandler.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/exactpro/th2/FixHandler.java b/src/main/java/com/exactpro/th2/FixHandler.java index 95da01c..d6f62fc 100644 --- a/src/main/java/com/exactpro/th2/FixHandler.java +++ b/src/main/java/com/exactpro/th2/FixHandler.java @@ -554,12 +554,6 @@ public Map onIncoming(@NotNull IChannel channel, @NotNull ByteBu serverMsgSeqNum.set(receivedMsgSeqNum); } - if(serverMsgSeqNum.get() < receivedMsgSeqNum && !isDup && !enabled.get()) { - if(strategy.getSendResendRequestOnLogonGap() && serverMsgSeqNum.get() > 5 ) { - sendResendRequest(serverMsgSeqNum.get() - 5, 0); - } - } - switch (msgTypeValue) { case MSG_TYPE_HEARTBEAT: if (LOGGER.isInfoEnabled()) LOGGER.info("Heartbeat received - {}", message.toString(US_ASCII)); @@ -569,6 +563,11 @@ public Map onIncoming(@NotNull IChannel channel, @NotNull ByteBu strategy.getState().addMessageID(messageId);strategy.getState().addMessageID(messageId); Map logonMetadata = strategy.getIncomingMessageStrategy(IncomingMessagesStrategy::getLogonStrategy).process(message, metadata); if (logonMetadata != null) return logonMetadata; + if(serverMsgSeqNum.get() < receivedMsgSeqNum && !isDup && !enabled.get()) { + if(strategy.getSendResendRequestOnLogonGap() && serverMsgSeqNum.get() > 5 ) { + sendResendRequest(serverMsgSeqNum.get() - 5, 0); + } + } break; case MSG_TYPE_RESEND_REQUEST: strategy.getState().addMessageID(messageId);