Skip to content

Commit

Permalink
ARTEMIS-4804 & ARTEMIS-4805 mitigate NPEs in ScaleDownHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
jbertram authored and clebertsuconic committed Sep 5, 2024
1 parent ec8026e commit 8b265f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -240,4 +240,7 @@ public interface ActiveMQClientMessageBundle {

@Message(id = 219068, value = "Connection closed while receiving cluster topology. Group:{}")
ActiveMQObjectClosedException connectionClosedOnReceiveTopology(DiscoveryGroup discoveryGroup);

@Message(id = 219069, value = "Unable to create Session. Either the ClientSessionFactory is closed or the ClientProtocolManager is dead.")
IllegalStateException unableToCreateSession();
}
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ private ClientSession createSessionInternal(final String rawUsername,
synchronized (sessions) {
if (closed || !clientProtocolManager.isAlive()) {
session.close();
return null;
throw ActiveMQClientMessageBundle.BUNDLE.unableToCreateSession();
}
sessions.add(session);
}
Expand Down

0 comments on commit 8b265f4

Please sign in to comment.