mirror of
https://github.com/esphome/esphome.git
synced 2025-08-09 11:57:46 +00:00
cleanup
This commit is contained in:
parent
2371ec1f9e
commit
c65586b5e1
@ -503,8 +503,8 @@ void APIServer::on_shutdown() {
|
||||
for (auto &c : this->clients_) {
|
||||
if (!c->send_message(DisconnectRequest())) {
|
||||
// If we can't send the disconnect request directly (tx_buffer full),
|
||||
// schedule it in the batch so it will be sent with the 5ms timer
|
||||
c->schedule_message_(nullptr, &APIConnection::try_send_disconnect_request, DisconnectRequest::MESSAGE_TYPE);
|
||||
// schedule it at the front of the batch so it will be sent with priority
|
||||
c->schedule_message_front_(nullptr, &APIConnection::try_send_disconnect_request, DisconnectRequest::MESSAGE_TYPE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user