Skip to content

Conversation

@sanity
Copy link
Contributor

@sanity sanity commented Jan 3, 2026

Problem

River UI was logging "Successfully sent update" even when messages were being silently dropped due to a closed WebSocket connection. This caused messages between users to not be delivered with no error indication.

Root cause: The WebSocket spec specifies that send() silently discards data when the socket is in CLOSING or CLOSED state. freenet-stdlib's WebApi::send() was returning Ok(()) even when the underlying WebSocket wasn't open.

Solution

freenet-stdlib 0.1.30 adds:

  1. Check ready_state before sending - returns error if WebSocket is not OPEN
  2. Enables onclose callback to notify clients when connection drops

River will now properly receive errors when WebSocket sends fail, enabling proper error handling and reconnection logic.

Testing

  • cargo check passes
  • This is a dependency bump; the fix is in freenet-stdlib

[AI-assisted - Claude]

Updates to freenet-stdlib 0.1.30 which fixes WebSocket send silently
failing when the connection is closed.

The fix adds:
1. Check WebSocket ready_state before sending, returns error if not OPEN
2. Enables onclose callback to notify when connection drops

This fixes the bug where River would log "Successfully sent update"
even when the WebSocket was closed and messages were being silently
dropped.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants