mirror of
https://github.com/esphome/esphome.git
synced 2026-09-03 19:46:02 +00:00
[web_server_idf] Hold pending_mutex_ for both deletes in destructor
This commit is contained in:
@@ -472,10 +472,10 @@ void AsyncResponseStream::printf(const char *fmt, ...) {
|
||||
|
||||
#ifdef USE_WEBSERVER
|
||||
AsyncEventSource::~AsyncEventSource() {
|
||||
LockGuard guard{this->pending_mutex_};
|
||||
for (auto *ses : this->sessions_) {
|
||||
delete ses; // NOLINT(cppcoreguidelines-owning-memory)
|
||||
}
|
||||
LockGuard guard{this->pending_mutex_};
|
||||
for (auto *ses : this->pending_sessions_) {
|
||||
delete ses; // NOLINT(cppcoreguidelines-owning-memory)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user