Fix NPE while stopping the RabbitMQEventBus bean when there is no connection established with RabbitMQ Event Bus (#12635)

This commit is contained in:
Suresh Kumar Anaparti 2026-02-19 00:36:46 +05:30 committed by GitHub
parent 9dd93cef76
commit 8b38cea33c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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();