Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/sprites/websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@ async def start(self) -> None:
ping_interval=WS_PING_INTERVAL,
ping_timeout=WS_PONG_WAIT,
max_size=10 * 1024 * 1024, # 10MB max message size
# The server holds the WS open for ~5s after sending EXIT
# before initiating its own close. The Elixir SDK doesn't
# wait at all — it sends a CLOSE frame and tears the TCP.
# Mirror that: close_timeout=0 sends CLOSE without awaiting
# the server's reciprocal frame, dropping per-exec latency
# from ~5.3s to ~140ms (a ~38x speedup). See #24.
close_timeout=0,
)
except InvalidStatusCode as e:
# Try to parse as a structured API error
Expand Down