Skip to content

Commit

Permalink
beta6
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenthebuilder committed Apr 23, 2024
1 parent 93b5308 commit 76fcadf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name="replit-river"
version="0.1.7-beta.5"
version="0.1.7-beta.6"
description="Replit river toolkit for Python"
authors = ["Replit <[email protected]>"]
license = "LICENSE"
Expand Down
14 changes: 8 additions & 6 deletions replit_river/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,12 +337,6 @@ async def send_message(
serviceName=service_name,
procedureName=procedure_name,
)
try:
await self._buffer.put(msg)
except Exception:
# We should close the session when there are too many messages in buffer
await self.close(True)
return
try:
await self._send_transport_message(
msg,
Expand All @@ -358,6 +352,14 @@ async def send_message(
logging.error(
f"Failed sending message : {e}, waiting for retry from buffer"
)
finally:
# We need to put this later to guarantee the ordering of message sent
try:
await self._buffer.put(msg)
except Exception:
# We should close the session when there are too many messages in buffer
await self.close(True)
return

async def _send_responses_from_output_stream(
self,
Expand Down

0 comments on commit 76fcadf

Please sign in to comment.