Skip to content

[VID-1603] Document should_retry as RPC-only - #2146

Merged
atoppi merged 2 commits into
mainfrom
atoppi/vid-1603-should-retry-rpc-only
Oct 14, 2026
Merged

atoppi merged 2 commits into
mainfrom
atoppi/vid-1603-should-retry-rpc-only

Conversation

@atoppi

@atoppi atoppi commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Summary

models.Error.should_retry is meant for RPC responses: true means the client may retry the same request. The same message is also embedded in the websocket SfuEvent.Error, where reconnect_strategy is what tells the client to reconnect. The proto didn't say so, and SDKs differ:

  • JS, Android, Flutter, Unity and Rust ignore the flag on websocket errors.
  • iOS reads it there and turns true into a FAST reconnect, overriding the strategy.

This PR documents the intended meaning. Alongside it, the SFU stops setting should_retry on websocket errors (GetStream/video-sfu#1728).

Changes

  • models.proto: a comment on Error.should_retry saying it's only meaningful in RPC responses, the SFU never sets it on websocket error events, and clients must follow reconnect_strategy there.
  • events.proto: a comment on Error.error pointing to reconnect_strategy.
  • Regenerated Go code with the pinned toolchain (protoc v3.21.5, protoc-gen-go v1.28.1). The only changes are comments; the wire format is unchanged.

Test plan

  • go build ./protobuf/video/sfu/...
  • protolint lint on both files

🤖 Generated with Claude Code

should_retry on models.Error is meant for RPC responses (retry the same
request). The same message is embedded in the websocket error event, where
reconnect_strategy decides what the client does; SDKs reading should_retry
there (iOS maps true to a FAST reconnect) can override the strategy. The
SFU stops setting it on websocket errors (GetStream/video-sfu#1728).

Comment-only change; regenerated with the pinned toolchain (protoc v3.21.5,
protoc-gen-go v1.28.1).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

@pojala pojala left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. Only comments change; the wire format is the same, and the regenerated Go code just realigns the struct fields. Older SFUs still set should_retry on websocket auth errors until GetStream/video-sfu#1728 is deployed everywhere, so iOS needs its fix whatever this comment says.

@atoppi
atoppi merged commit dee3fb4 into main Oct 14, 2026
5 checks passed
@atoppi
atoppi deleted the atoppi/vid-1603-should-retry-rpc-only branch October 14, 2026 14:54
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