Skip to content

Commit

Permalink
properly handled InterruptedException
Browse files Browse the repository at this point in the history
Signed-off-by: Kalin Kostashki <kalin.kostashki@bosch.com>
  • Loading branch information
kalinkostashki committed Oct 28, 2024
1 parent 70e4603 commit 83b32b5
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -372,10 +372,15 @@ public void onConnected(final WebSocket websocket, final Map<String, List<String
LOGGER.debug("Reconnecting is completed -> emitting subscriptionMessages: {}", subscriptionMessages);
subscriptionMessages.values().forEach(this::emit);
}
} catch (TimeoutException | InterruptedException | ExecutionException e) {
} catch (TimeoutException | ExecutionException e) {
isReconnecting.complete(false);
fixedRateChecker.cancel(true);
LOGGER.error("Reconnecting failed: {}", e.getMessage());
} catch (InterruptedException e) {
isReconnecting.complete(false);
fixedRateChecker.cancel(true);
LOGGER.error("Reconnecting failed due to thread being interrupted: {}", e.getMessage());
Thread.currentThread().interrupt();
}
}
});
Expand Down

0 comments on commit 83b32b5

Please sign in to comment.