Optimize API flash usage by storing message size at compile time (#9447)

This commit is contained in:
J. Nick Koston authored and Jesse Hills committed 2025-07-13 11:05:13 +12:00
1 parent bab3deee1b
commit 1b222ceca3
9 files changed
+358 -471

No files matched your search

+2 -1
View File
@@ -475,7 +475,8 @@ void APIServer::on_shutdown() {
if (!c->send_message(DisconnectRequest())) {
// If we can't send the disconnect request directly (tx_buffer full),
// 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);
c->schedule_message_front_(nullptr, &APIConnection::try_send_disconnect_request, DisconnectRequest::MESSAGE_TYPE,
DisconnectRequest::ESTIMATED_SIZE);
}
}
}