From 2b82a4db35774ebc698f4291a982ae50012e8ad1 Mon Sep 17 00:00:00 2001
From: cbucht200 <100870495+cbucht200@users.noreply.github.com>
Date: Tue, 8 Oct 2024 10:38:19 -0400
Subject: [PATCH] RBUS Events are not received if handle is closed and
 reopened. (#221)

Event dispatch thread state is maintained in a static global variable. When rbus handle is shutdown, the state is never set to false, so any future handles opened will not receive events.
---
 src/core/rbuscore.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/core/rbuscore.c b/src/core/rbuscore.c
index 5351b9f6..f4cb6536 100644
--- a/src/core/rbuscore.c
+++ b/src/core/rbuscore.c
@@ -682,6 +682,7 @@ rbusCoreError_t rbus_closeBrokerConnection()
         return RBUSCORE_ERROR_GENERAL;
     }
     g_connection = NULL;
+    g_run_event_client_dispatch = false;
     unlock();
 
     pthread_mutex_destroy(&g_mutex);