This is an automated email from the ASF dual-hosted git repository.

dahn pushed a commit to branch 4.20
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.20 by this push:
     new 8b38cea33cd Fix NPE while stopping the RabbitMQEventBus bean when 
there is no connection established with RabbitMQ Event Bus (#12635)
8b38cea33cd is described below

commit 8b38cea33cdd014de3c53bc2a3ff25f58ee82c35
Author: Suresh Kumar Anaparti <[email protected]>
AuthorDate: Thu Feb 19 00:36:46 2026 +0530

    Fix NPE while stopping the RabbitMQEventBus bean when there is no 
connection established with RabbitMQ Event Bus (#12635)
---
 .../main/java/org/apache/cloudstack/mom/rabbitmq/RabbitMQEventBus.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/plugins/event-bus/rabbitmq/src/main/java/org/apache/cloudstack/mom/rabbitmq/RabbitMQEventBus.java
 
b/plugins/event-bus/rabbitmq/src/main/java/org/apache/cloudstack/mom/rabbitmq/RabbitMQEventBus.java
index e8067e75b40..2851ef3498e 100644
--- 
a/plugins/event-bus/rabbitmq/src/main/java/org/apache/cloudstack/mom/rabbitmq/RabbitMQEventBus.java
+++ 
b/plugins/event-bus/rabbitmq/src/main/java/org/apache/cloudstack/mom/rabbitmq/RabbitMQEventBus.java
@@ -492,7 +492,7 @@ public class RabbitMQEventBus extends ManagerBase 
implements EventBus {
 
     @Override
     public synchronized boolean stop() {
-        if (s_connection.isOpen()) {
+        if (s_connection != null && s_connection.isOpen()) {
             for (String subscriberId : s_subscribers.keySet()) {
                 Ternary<String, Channel, EventSubscriber> subscriberDetails = 
s_subscribers.get(subscriberId);
                 Channel channel = subscriberDetails.second();

Reply via email to