Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenthebuilder committed Apr 23, 2024
1 parent bf681ae commit e2ae46d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion replit_river/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,6 @@ 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
3 changes: 2 additions & 1 deletion replit_river/transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ async def close_all_sessions(self) -> None:
f"start closing transport {self._transport_id}, number sessions : "
f"{len(sessions)}"
)
for session in sessions:
sessions_to_close = list(sessions)
for session in sessions_to_close:
await session.close(False)
logging.info(f"Transport closed {self._transport_id}")

Expand Down

0 comments on commit e2ae46d

Please sign in to comment.