We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b680f97 commit 672f02fCopy full SHA for 672f02f
src/AsyncEventSource.cpp
@@ -380,12 +380,12 @@ void AsyncEventSource::_addClient(AsyncEventSourceClient *client) {
380
}
381
382
void AsyncEventSource::_handleDisconnect(AsyncEventSourceClient *client) {
383
-#ifdef ESP32
384
- std::lock_guard<std::recursive_mutex> lock(_client_queue_lock);
385
-#endif
386
if (_disconnectcb) {
387
_disconnectcb(client);
388
+#ifdef ESP32
+ std::lock_guard<std::recursive_mutex> lock(_client_queue_lock);
+#endif
389
for (auto i = _clients.begin(); i != _clients.end(); ++i) {
390
if (i->get() == client) {
391
_clients.erase(i);
0 commit comments