Skip to content

Commit d6806aa

Browse files
sureshanapartiLocharla, Sandeep
authored andcommitted
Fix NPE while stopping the RabbitMQEventBus bean when there is no connection established with RabbitMQ Event Bus (apache#12635)
1 parent 343ec00 commit d6806aa

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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
@@ -493,7 +493,7 @@ public boolean start() {
493493

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

0 commit comments

Comments
 (0)