Skip to content

Commit

Permalink
waitng until logged in for fixed timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Plotnikov committed Nov 21, 2023
1 parent b8220c5 commit d17fc47
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/com/exactpro/th2/FixHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -2160,7 +2160,8 @@ private void openChannelAndWaitForLogon() throws ExecutionException, Interrupted
}

private void waitUntilLoggedIn() {
while (!enabled.get()) {
long start = System.currentTimeMillis();
while (!enabled.get() && System.currentTimeMillis() - start < 2000) {
LOGGER.info("Waiting until session will be logged in: {}", channel.getSessionAlias());
try {
Thread.sleep(100);
Expand Down

0 comments on commit d17fc47

Please sign in to comment.