cleanup
This commit is contained in:
@@ -1538,10 +1538,9 @@ void APIConnection::subscribe_home_assistant_states(const SubscribeHomeAssistant
|
||||
bool APIConnection::try_to_clear_buffer(bool log_out_of_space) {
|
||||
if (this->remove_)
|
||||
return false;
|
||||
if (this->helper_->can_write_without_blocking()) {
|
||||
delay(0);
|
||||
if (this->helper_->can_write_without_blocking())
|
||||
return true;
|
||||
}
|
||||
delay(0);
|
||||
APIError err = this->helper_->loop();
|
||||
if (err != APIError::OK) {
|
||||
on_fatal_error();
|
||||
@@ -1549,9 +1548,8 @@ bool APIConnection::try_to_clear_buffer(bool log_out_of_space) {
|
||||
api_error_to_str(err), errno);
|
||||
return false;
|
||||
}
|
||||
if (this->helper_->can_write_without_blocking()) {
|
||||
if (this->helper_->can_write_without_blocking())
|
||||
return true;
|
||||
}
|
||||
if (log_out_of_space) {
|
||||
ESP_LOGV(TAG, "Cannot send message because of TCP buffer space");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user