Diff between 0ddc54ca5f335c198c0ecc236f57997a61b3e3b7 and 3fe2e7aa35a00fb67e642e76f9e0c0262b18fc3c

Changed Files

File Additions Deletions Status
src/device.c +4 -1 modified

Full Patch

diff --git a/src/device.c b/src/device.c
index 4317a33..0b45880 100644
--- a/src/device.c
+++ b/src/device.c
@@ -66,6 +66,8 @@
 #define DISCONNECT_TIMER	2
 #define DISCOVERY_TIMER		2
 
+#define AUTO_CONNECTION_INTERVAL	5 /* Next connection attempt */
+
 /* When all services should trust a remote device */
 #define GLOBAL_TRUST "[all]"
 
@@ -1791,8 +1793,9 @@ static void att_connect_cb(GIOChannel *io, GError *gerr, gpointer user_data)
 			device->browse = NULL;
 			browse_request_free(req, TRUE);
 		} else if (device->auto_connect)
-			device->auto_id = g_idle_add_full(
+			device->auto_id = g_timeout_add_seconds_full(
 						G_PRIORITY_DEFAULT_IDLE,
+						AUTO_CONNECTION_INTERVAL,
 						att_connect, device,
 						att_connect_dispatched);