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 4e8d305 commit cade01e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/java/com/exactpro/th2/FixHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ public CompletableFuture<MessageID> send(@NotNull ByteBuf body, @NotNull Map<Str
}
}
} else {
while (channel.isOpen() && !enabled.get()) {
while (!enabled.get()) {
if (LOGGER.isWarnEnabled()) LOGGER.warn("Session is not yet logged in: {}", channel.getSessionAlias());
try {
//noinspection BusyWait
Expand Down Expand Up @@ -712,6 +712,12 @@ private Map<String, String> handleLogout(@NotNull ByteBuf message, Map<String, S
cancelFuture(testRequestTimer);
enabled.set(false);
context.send(CommonUtil.toEvent("logout for sender - " + settings.getSenderCompID()), null);//make more useful
try {
disconnect(false);
channel.open();
} catch (Exception e) {
LOGGER.error("Error while disconnecting in handle logout.");
}
return metadata;
}

Expand Down

0 comments on commit cade01e

Please sign in to comment.