Skip to content

Commit 445d2fd

Browse files
committed
Fix stopping TCP Server transport in jsonrpc.
1 parent 9b2b2ec commit 445d2fd

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

finecode_jsonrpc/src/finecode_jsonrpc/server_transport.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,10 @@ async def _read_messages(self, reader: asyncio.StreamReader) -> None:
437437

438438
logger.debug(f"End reading messages | {self._readable_id}")
439439

440+
# Signal that the connection has ended (client disconnect, EOF, or error)
441+
# so that any caller polling _stop_event can unblock.
442+
self._stop_event.set()
443+
440444
if self._on_exit is not None:
441445
try:
442446
await self._on_exit()

0 commit comments

Comments
 (0)