mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-06-11 11:56:18 +00:00
G3: F01 — remove asyncio.Future wrap from TCP connect()
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user