Merge branch 'loop_monitored_socket_cleanups' into integration

This commit is contained in:
J. Nick Koston
2026-02-20 18:21:18 -06:00
3 changed files with 6 additions and 3 deletions

View File

@@ -249,7 +249,8 @@ class APIServer : public Component,
void add_state_subscription_(std::string entity_id, optional<std::string> attribute,
std::function<void(const std::string &)> f, bool once);
#endif // USE_API_HOMEASSISTANT_STATES
// Socket destructor will close or abort depending on platform
// No explicit close() needed — listen sockets have no active connections on
// failure/shutdown. Destructor handles fd cleanup (close or abort per platform).
inline void destroy_socket_() {
delete this->socket_;
this->socket_ = nullptr;

View File

@@ -14,7 +14,8 @@ class DNSServer {
void process_next_request();
protected:
// Socket destructor will close or abort depending on platform
// No explicit close() needed — listen sockets have no active connections on
// failure/shutdown. Destructor handles fd cleanup (close or abort per platform).
inline void destroy_socket_() {
delete this->socket_;
this->socket_ = nullptr;

View File

@@ -452,7 +452,8 @@ void ESPHomeOTAComponent::log_remote_closed_(const LogString *during) {
void ESPHomeOTAComponent::server_failed_(const LogString *msg) {
this->log_socket_error_(msg);
// Socket destructor will close or abort depending on platform
// No explicit close() needed — listen sockets have no active connections on
// failure/shutdown. Destructor handles fd cleanup (close or abort per platform).
delete this->server_;
this->server_ = nullptr;
this->mark_failed();