Skip to content

Commit b5d9a12

Browse files
committed
Updated spec for implicit attach as per review comments
1 parent e157409 commit b5d9a12

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

specifications/objects-features.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@ Objects feature enables clients to store shared data as "objects" on a channel.
1212

1313
- `(RTO1)` `RealtimeObjects#getRoot` function:
1414
- `(RTO1a)` Requires the `OBJECT_SUBSCRIBE` channel mode to be granted per [RTO2](#RTO2)
15-
- `(RTO1b)` This clause has been replaced by [RTO1e](#RTO1e) and [RTO1f](#RTO1f).
16-
- `(RTO1e)` If the channel is in the `INITIALIZED`, `DETACHED`, `DETACHING`, or `ATTACHING` state, implicitly attach the `RealtimeChannel` and wait for the attach to complete
17-
- `(RTO1f)` If the channel is in the `FAILED` state, the library should throw an `ErrorInfo` error with `statusCode` 400 and `code` 90001, indicating that the channel operation failed due to the current channel state
15+
- `(RTO1b)` This clause has been replaced by [RTO1e](#RTO1e).
16+
- `(RTO1e)` Performs the *ensure-attached* procedure to make sure the underlying `RealtimeChannel` is in the `ATTACHED` state before proceeding.
17+
- `(RTO1e1)` If the channel (see [RTL2](#RTL2) for channel states) is in the `INITIALIZED`, `DETACHED`, `DETACHING`, or `ATTACHING` state, implicitly attach the `RealtimeChannel` and wait for the attach to complete
18+
- `(RTO1e1a)` If the implicit attach fails (for example, the channel transitions to the non-attached state), the call MUST reject with the same `ErrorInfo` that caused the attach to fail
19+
- `(RTO1e2)` If the channel is in the `FAILED` state, the library MUST throw an `ErrorInfo` error with `statusCode` 400 and `code` 90001, indicating that the channel operation failed due to the current channel state
20+
- `(RTO1e3)` If the channel is in the `ATTACHED` or `SUSPENDED` state, proceed without attaching. A `SUSPENDED` channel is intentionally not re-attached so that any locally-held object state remains readable while the connection and channel state is being re-established.
1821
- `(RTO1c)` If the [RTO17](#RTO17) sync state is not `SYNCED`, waits for the sync state to transition to `SYNCED`
1922
- `(RTO1d)` Returns the object with id `root` from the internal `ObjectsPool` as a `LiveMap`
2023
- `(RTO11)` `RealtimeObjects#createMap` function:

0 commit comments

Comments
 (0)