Skip to content

Commit 8b38cea

Browse files
Fix NPE while stopping the RabbitMQEventBus bean when there is no connection established with RabbitMQ Event Bus (#12635)
1 parent 9dd93ce commit 8b38cea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/event-bus/rabbitmq/src/main/java/org/apache/cloudstack/mom/rabbitmq/RabbitMQEventBus.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ public boolean start() {
492492

493493
@Override
494494
public synchronized boolean stop() {
495-
if (s_connection.isOpen()) {
495+
if (s_connection != null && s_connection.isOpen()) {
496496
for (String subscriberId : s_subscribers.keySet()) {
497497
Ternary<String, Channel, EventSubscriber> subscriberDetails = s_subscribers.get(subscriberId);
498498
Channel channel = subscriberDetails.second();

0 commit comments

Comments
 (0)