We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7be1742 + 180b850 commit 9bdefb8Copy full SHA for 9bdefb8
src/AsyncWebSocket.cpp
@@ -916,11 +916,10 @@ void AsyncWebSocket::cleanupClients(uint16_t maxClients) {
916
_clients.front().close();
917
}
918
919
- for (auto iter = std::begin(_clients); iter != std::end(_clients);) {
920
- if (iter->shouldBeDeleted()) {
921
- iter = _clients.erase(iter);
922
- } else {
923
- iter++;
+ for (auto i = _clients.begin(); i != _clients.end(); ++i) {
+ if (i->shouldBeDeleted()) {
+ _clients.erase(i);
+ break;
924
925
926
0 commit comments