Skip to content

Commit

Permalink
Use timeout for opening connection after termination on manual logout…
Browse files Browse the repository at this point in the history
… send
  • Loading branch information
OptimumCode committed Sep 18, 2023
1 parent 9922837 commit 0cfd35f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/exactpro/th2/FixHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ private CompletableFuture<MessageID> send(@NotNull ByteBuf body, @NotNull Map<St
try {
disconnect(!isUngracefulDisconnect);
enabled.set(false);
channel.open().get();
channel.open().get(settings.getConnectionTimeoutOnSend(), TimeUnit.MILLISECONDS);
} 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 0cfd35f

Please sign in to comment.