mirror of
https://github.com/esphome/esphome.git
synced 2026-03-01 18:34:21 -07:00
7a6df910e5457c7f2bcf758a24e491a03a425870
Replace std::unique_ptr<Socket> with raw Socket* for listen sockets that are created once in setup() and live for the program lifetime. The unique_ptr move-assign generates dead code to destroy the previous value (which is always nullptr in setup), including a virtual destructor call through the vtable that the compiler cannot eliminate because __uniq_ptr_impl::reset is not inlined. Changes: - Use .release() to extract raw pointer from socket factory return - Add socket_failed_/server_failed_ helpers that combine error logging, cleanup, and mark_failed into a single call - Convert error messages to LOG_STR for flash storage on ESP8266 - Socket destructor already calls close(), so explicit close() before delete is unnecessary Saves 20 bytes on ESP32-IDF, 180 bytes on ESP8266.
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme
Multiple Licenses
528 MiB
Languages
C++
64.1%
Python
35.5%
C
0.3%
