diff --git a/src/connectionmanager.cpp b/src/connectionmanager.cpp index 3fc8e9f4..d65d0726 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};