From 47f6df47975c4a091db7febf0cee21aa347330d4 Mon Sep 17 00:00:00 2001 From: Matthew Wolter Date: Sat, 11 Apr 2026 19:45:55 -0700 Subject: [PATCH] =?UTF-8?q?G3:=20F01=20=E2=80=94=20remove=20asyncio.Future?= =?UTF-8?q?=20wrap=20from=20TCP=20connect()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TCPConnection.connect() returned a resolved asyncio.Future wrapping self.host instead of the plain string. ConnectionManager put this Future directly into the CONNECTED event payload, which crashed any downstream serializer (e.g. HA recorder's sanitize_event_data) that tried to walk the payload dict. BLE and serial already return plain strings. Fix: delete the Future creation and return self.host directly. Refs: Forensics report finding F01 --- src/meshcore/tcp_cx.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/meshcore/tcp_cx.py b/src/meshcore/tcp_cx.py index 497c3b2..a28b625 100644 --- a/src/meshcore/tcp_cx.py +++ b/src/meshcore/tcp_cx.py @@ -59,10 +59,7 @@ class TCPConnection: ) logger.info("TCP Connection started") - future = asyncio.Future() - future.set_result(self.host) - - return future + return self.host def set_reader(self, reader): self.reader = reader