A restarted ESPHome serial proxy could leave Samsung EX-Link control stuck in a half-closed state. The library then tried the dead stream again on every five-second poll, producing repeated tracebacks and never reconnecting; the contributor reports that a separate serial-library bug made those tracebacks grow until Home Assistant became unusable.
The repair clears the reader, writer and read task before waiting for a broken connection to close, catches close errors and refuses new writes once the connection is no longer active. Tests cover write failure, read failure and reconnecting after the link returns. Home Assistant Core’s dependency declaration now points to version 1.1.1 of the library, carrying the repair into Core.
This is Jon Harris’s first contribution to the samsung-exlink repository. Paulus Schoutsen reviewed and approved the library fix, and erwindouna approved its adoption in Home Assistant Core.