Skip to content

Commit

Permalink
Check if channel is enabled or active logon exchange is in progress f…
Browse files Browse the repository at this point in the history
…or gracefull disconnect
  • Loading branch information
denis.plotnikov committed Nov 29, 2024
1 parent d2092ae commit c6ca21c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/com/exactpro/th2/FixHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -2634,7 +2634,11 @@ private void disconnect(boolean graceful) throws ExecutionException, Interrupted
resetHeartbeatTask();
resetTestRequestTask();
Thread.sleep(settings.getDisconnectCleanUpTimeoutMs());
channel.close().get();
if(!graceful) {
channel.close().get();
} else if(!enabled.get() && activeLogonExchange.get()) {
channel.close().get();
}
}

private void openChannelAndWaitForLogon() throws ExecutionException, InterruptedException {
Expand Down

0 comments on commit c6ca21c

Please sign in to comment.