Skip to content

Commit

Permalink
Everything work except for notify
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenthebuilder committed Apr 23, 2024
1 parent 2fc1c5d commit b55d513
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions replit_river/client_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ async def send_upload(
"""

stream_id = nanoid.generate()
output: Channel[Any] = Channel(1024)
output: Channel[Any] = Channel(1)
self._streams[stream_id] = output
first_message = True
try:
Expand All @@ -98,7 +98,8 @@ async def send_upload(
payload=init_serializer(init),
)
first_message = False

# If this request is not closed and the session is killed, we should
# throws exception here
async for item in request:
control_flags = 0
if first_message:
Expand Down
1 change: 1 addition & 0 deletions replit_river/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@ async def close(self, is_unexpected_close: bool) -> None:
await self._task_manager.cancel_all_tasks()
# TODO: unexpected_close should close stream differently here to
# throw exception correctly.
logging.error(f"##### closing all streams here : {self._streams.values()}")
for stream in self._streams.values():
stream.close()
async with self._stream_lock:
Expand Down

0 comments on commit b55d513

Please sign in to comment.