mirror of
https://github.com/esphome/esphome.git
synced 2025-07-28 14:16:40 +00:00
OTA: Close and clean up client when setsockopt fails (#8865)
Co-authored-by: Clyde Stubbs <2366188+clydebarrow@users.noreply.github.com>
This commit is contained in:
parent
1ec57a74b5
commit
69da17742f
@ -111,6 +111,8 @@ void ESPHomeOTAComponent::handle_() {
|
||||
int err = client_->setsockopt(IPPROTO_TCP, TCP_NODELAY, &enable, sizeof(int));
|
||||
if (err != 0) {
|
||||
ESP_LOGW(TAG, "Socket could not enable TCP nodelay, errno %d", errno);
|
||||
client_->close();
|
||||
client_ = nullptr;
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user