From c73bdbca1b4278ada24dde68e0d09c352dcaa004 Mon Sep 17 00:00:00 2001
From: "Sicelo A. Mhlongo" <absicsz@gmail.com>
Date: Tue, 30 Sep 2025 13:17:16 +0200
Subject: [PATCH] WIP: iio-sensor-proxy.c: Do not exit based on sensor events

...
---
 src/iio-sensor-proxy.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/iio-sensor-proxy.c b/src/iio-sensor-proxy.c
index 5f26d3d..7505783 100644
--- a/src/iio-sensor-proxy.c
+++ b/src/iio-sensor-proxy.c
@@ -766,8 +766,7 @@ name_acquired_handler (GDBusConnection *connection,
 
 bail:
 	data->ret = 0;
-	g_debug ("No sensors or missing kernel drivers for the sensors");
-	g_main_loop_quit (data->loop);
+	g_debug ("No sensors or missing kernel drivers for the sensors. Waiting for hotplug sensors");
 }
 
 static gboolean
@@ -1050,9 +1049,6 @@ sensor_changes (GUdevClient *client,
 				send_driver_changed_dbus_event (data, i);
 			}
 		}
-
-		if (!any_sensors_left (data))
-			g_main_loop_quit (data->loop);
 	} else if (g_strcmp0 (action, "add") == 0) {
 		for (i = 0; i < G_N_ELEMENTS(drivers); i++) {
 			SensorDriver *driver = (SensorDriver *) drivers[i];
-- 
2.51.0

