[api] Break api_connection/api_server include cycle to drop custom unique_ptr deleter (#16542)

This commit is contained in:
J. Nick Koston authored and GitHub committed 2026-05-21 15:42:57 -05:00
1 parent 1ea95264bd
commit 96eced0378
6 files changed
+71 -55

No files matched your search

-5
View File
@@ -30,11 +30,6 @@ APIServer *global_api_server = nullptr; // NOLINT(cppcoreguidelines-avoid-non-c
APIServer::APIServer() { global_api_server = this; }
// Custom deleter defined here so `delete` sees the complete APIConnection type.
// This prevents libc++ from emitting an "incomplete type" error when other
// translation units only have the forward declaration of APIConnection.
void APIServer::APIConnectionDeleter::operator()(APIConnection *p) const { delete p; }
void APIServer::socket_failed_(const LogString *msg) {
ESP_LOGW(TAG, "Socket %s: errno %d", LOG_STR_ARG(msg), errno);
this->destroy_socket_();