mirror of
https://github.com/esphome/esphome.git
synced 2025-09-05 04:42:21 +01:00
preen
This commit is contained in:
@@ -85,9 +85,10 @@ void ESPHomeOTAComponent::dump_config() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ESPHomeOTAComponent::loop() {
|
void ESPHomeOTAComponent::loop() {
|
||||||
// Skip handle_() call if no client connected and no incoming connections
|
// Skip handle_handshake_() call if no client connected and no incoming connections
|
||||||
// This optimization reduces idle loop overhead when OTA is not active
|
// This optimization reduces idle loop overhead when OTA is not active
|
||||||
// Note: No need to check server_ for null as the component is marked failed in setup() if server_ creation fails
|
// Note: No need to check server_ for null as the component is marked failed in setup()
|
||||||
|
// if server_ creation fails
|
||||||
if (this->client_ != nullptr || this->server_->ready()) {
|
if (this->client_ != nullptr || this->server_->ready()) {
|
||||||
this->handle_handshake_();
|
this->handle_handshake_();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user