Skip to content

Commit

Permalink
simplify reconnect strategy (#660)
Browse files Browse the repository at this point in the history
  • Loading branch information
thesyncim authored Jul 10, 2024
2 parents 5abe10a + 26f55ee commit 898a740
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 38 deletions.
54 changes: 23 additions & 31 deletions protobuf/video/sfu/models/models.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 4 additions & 7 deletions protobuf/video/sfu/models/models.proto
Original file line number Diff line number Diff line change
Expand Up @@ -273,20 +273,17 @@ enum CallEndedReason {
// WebsocketReconnectStrategy defines the ws strategies available for handling reconnections.
enum WebsocketReconnectStrategy {
WEBSOCKET_RECONNECT_STRATEGY_UNSPECIFIED = 0;
// Sent after reaching the maximum reconnection attempts, leading to permanent disconnect.
// Sent after reaching the maximum reconnection attempts, or any other unrecoverable error leading to permanent disconnect.
WEBSOCKET_RECONNECT_STRATEGY_DISCONNECT = 1;
// SDK should maintaining existing publisher/subscriber pc instances
// and establish a new WebSocket connection.
WEBSOCKET_RECONNECT_STRATEGY_FAST = 2;
// SDK should drop existing pc instances and creates a fresh WebSocket connection,
// ensuring a clean state for the reconnection.
WEBSOCKET_RECONNECT_STRATEGY_CLEAN = 3;
// SDK should obtain new credentials from the coordinator, drops existing pc instances, and initializes
// SDK should obtain new credentials from the coordinator, drops existing pc instances, set a new session_id and initializes
// a completely new WebSocket connection, ensuring a comprehensive reset.
WEBSOCKET_RECONNECT_STRATEGY_FULL = 4;
// SDK should obtain new credentials from the coordinator,excluding current SFU, drops existing pc instances, and initializes
// a completely new WebSocket connection, ensuring a comprehensive reset.
WEBSOCKET_RECONNECT_STRATEGY_FULL_NEW_SFU = 5;
WEBSOCKET_RECONNECT_STRATEGY_REJOIN = 4;
// SDK should migrate to a new SFU instance
WEBSOCKET_RECONNECT_STRATEGY_MIGRATE = 6;
WEBSOCKET_RECONNECT_STRATEGY_MIGRATE = 5;
};

0 comments on commit 898a740

Please sign in to comment.