mirror of
https://github.com/esphome/esphome.git
synced 2025-09-19 03:32:20 +01:00
Handle client disconnects
This commit is contained in:
@@ -20,6 +20,10 @@ void ZWaveProxy::loop() {
|
||||
if (this->response_handler_()) {
|
||||
return; // If a response was handled, exit early to avoid a CAN
|
||||
}
|
||||
if (this->api_connection_ != nullptr && !this->api_connection_->is_connection_setup()) {
|
||||
ESP_LOGW(TAG, "Subscriber disconnected");
|
||||
this->api_connection_ = nullptr; // Unsubscribe if disconnected
|
||||
}
|
||||
|
||||
while (this->available()) {
|
||||
uint8_t byte;
|
||||
|
Reference in New Issue
Block a user