fix: send memStatus once per network broadcast

emitSockets() sent memStatus and then emitSockets(255) sent it again, so
room 0 got two identical events in one pass after every /discovery.
Only the per-client path sends it from emitSockets(num).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
cjkas 2026-10-12 18:00:52 +02:00
parent 08d2cd7a0c
commit b4d480caa0

View file

@ -234,7 +234,8 @@ void ESPNetwork::emitSockets(uint8_t num) {
this->lastRSSIEmit = millis();
}
}
this->emitHeap(num);
// A broadcast comes from emitSockets(), which has already sent memStatus.
if(num != 255) this->emitHeap(num);
}
void ESPNetwork::setConnected(conn_types_t connType) {
safe_wdt_reset();