1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-08 14:22:21 +01:00
This commit is contained in:
J. Nick Koston
2025-08-02 22:45:13 -10:00
parent 451095eef4
commit 53449f298e

View File

@@ -472,10 +472,11 @@ void Application::unregister_socket_fd(int fd) {
// Only recalculate max_fd if we removed the current max // Only recalculate max_fd if we removed the current max
if (fd == this->max_fd_) { if (fd == this->max_fd_) {
this->max_fd_ = -1; this->max_fd_ = -1;
for (int sock_fd : this->socket_fds_) for (int sock_fd : this->socket_fds_) {
if (sock_fd > this->max_fd_) if (sock_fd > this->max_fd_)
this->max_fd_ = sock_fd; this->max_fd_ = sock_fd;
} }
}
return; return;
} }
} }