Skip to content

Commit

Permalink
Handle all malformed channel and connection closing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
IsuruMaduranga committed May 28, 2024
1 parent 98a8a8f commit 23608ab
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,17 +112,17 @@ public boolean storeMessage(MessageContext synCtx) {
if (channel != null) {
try {
channel.close();
} catch (IOException | TimeoutException exception) {
} catch (Exception channelCloseException) {
log.error("Error occurred while closing the malformed channel Error: " +
exception.getLocalizedMessage());
channelCloseException.getLocalizedMessage());
}
}
if (connection != null) {
try {
connection.close();
} catch (IOException ioException) {
} catch (Exception connectionCloseException) {
log.error("Error occurred while closing the malformed connection Error: " +
ioException.getLocalizedMessage());
connectionCloseException.getLocalizedMessage());
}
}
channel = null;
Expand Down

0 comments on commit 23608ab

Please sign in to comment.