Skip to content

Commit

Permalink
Disable reconnect for logout with disable reconenct prorpery
Browse files Browse the repository at this point in the history
  • Loading branch information
denis.plotnikov committed Dec 5, 2024
1 parent 75c7faf commit 9eb318d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/com/exactpro/th2/FixHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,9 @@ public CompletableFuture<MessageID> send(@NotNull ByteBuf body, @NotNull Map<Str
disconnect(!isUngracefulDisconnect);
enabled.set(false);
activeLogonExchange.set(false);
sendingTimeoutHandler.getWithTimeout(channel.open());
if(!disableReconnect) {
sendingTimeoutHandler.getWithTimeout(channel.open());
}
} catch (Exception e) {
context.send(CommonUtil.toErrorEvent(String.format("Error while ending session %s by user logout. Is graceful disconnect: %b", channel.getSessionAlias(), !isUngracefulDisconnect), e));
}
Expand Down

0 comments on commit 9eb318d

Please sign in to comment.