From 16e03dc8884949c1c877864195a12028fa3a3490 Mon Sep 17 00:00:00 2001
From: Adrien Beraud <adrien.beraud@savoirfairelinux.com>
Date: Mon, 21 Oct 2024 16:54:50 -0400
Subject: [PATCH] ConnectionManager: fix infinite loop

Change-Id: I3bad2a7673e9faf860a4a34544c51ef2df2d387c
---
 src/connectionmanager.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/connectionmanager.cpp b/src/connectionmanager.cpp
index 3fc8e9f..d65d072 100644
--- a/src/connectionmanager.cpp
+++ b/src/connectionmanager.cpp
@@ -262,6 +262,8 @@ struct DeviceInfo {
                     ret.emplace_back(std::move(cb));
                     it = connecting.erase(it);
                 }
+            } else {
+                ++it;
             }
         }
         for (auto it = waiting.begin(); it != waiting.end();) {
@@ -276,6 +278,8 @@ struct DeviceInfo {
                     ret.emplace_back(std::move(cb));
                     it = waiting.erase(it);
                 }
+            } else {
+                ++it;
             }
         }
         return {ret, retry};
-- 
GitLab