1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-02 19:32:19 +01:00

Improve shutdown reliability when tx buffer is full (#9043)

This commit is contained in:
J. Nick Koston
2025-06-11 05:08:23 -05:00
committed by GitHub
parent 3411e45a0a
commit e8aa7cff36
3 changed files with 18 additions and 2 deletions

View File

@@ -426,6 +426,10 @@ class APIConnection : public APIServerConnection {
static uint16_t try_send_list_info_done(EntityBase *entity, APIConnection *conn, uint32_t remaining_size,
bool is_single);
// Method for DisconnectRequest batching
static uint16_t try_send_disconnect_request(EntityBase *entity, APIConnection *conn, uint32_t remaining_size,
bool is_single);
// Helper function to get estimated message size for buffer pre-allocation
static uint16_t get_estimated_message_size(uint16_t message_type);