Close TCP connection after synthesis so HA receives FIN and unblocks
All checks were successful
Build and Push Docker Image / build (push) Successful in 2m10s
All checks were successful
Build and Push Docker Image / build (push) Successful in 2m10s
disconnect() was a no-op in the base class; writer.close() was never called, leaving HA waiting for a TCP FIN that never arrived. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -83,6 +83,13 @@ class KokoroEventHandler(AsyncEventHandler):
|
|||||||
self.config = config
|
self.config = config
|
||||||
self.executor = executor
|
self.executor = executor
|
||||||
|
|
||||||
|
async def disconnect(self) -> None:
|
||||||
|
self.writer.close()
|
||||||
|
try:
|
||||||
|
await self.writer.wait_closed()
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
async def handle_event(self, event: Event) -> bool:
|
async def handle_event(self, event: Event) -> bool:
|
||||||
if Describe.is_type(event.type):
|
if Describe.is_type(event.type):
|
||||||
await self.write_event(self.wyoming_info.event())
|
await self.write_event(self.wyoming_info.event())
|
||||||
|
|||||||
Reference in New Issue
Block a user