Skip to content

Commit 3080968

Browse files
committed
Changed how Stdio closes
1 parent d0a1444 commit 3080968

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lf_toolkit/io/stream_io.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ async def _handle_client(self, client: StreamIO):
9191
break
9292

9393
response = await self.dispatch(data.decode("utf-8"))
94+
print(f"Responding: {response}") # and this
9495

9596
await io.write(response.encode("utf-8"))
9697
except anyio.EndOfStream:
@@ -101,5 +102,4 @@ async def _handle_client(self, client: StreamIO):
101102
break
102103
except Exception as e:
103104
print(f"Exception: {e}")
104-
finally:
105-
await client.close()
105+
await client.close()

0 commit comments

Comments
 (0)