You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// RTO5c1b1c: Otherwise, log a warning that an unsupported object state message has been received, and discard the current ObjectState without taking any action
354
-
logger.log("Unsupported object state message received for objectId: \(syncObjectsPoolEntry.state.objectId)", level:.warn)
355
-
newEntry =nil
356
-
}
357
-
358
-
iflet newEntry {
359
-
// Note that we will never replace the root object here, and thus never break the RTO3b invariant that the root object is always a map. This is because the pool always contains a root object and thus we always go through the RTO5c1a branch of the `if` above.
// (The nosync_createObjectFromSync precondition that this is not the root object is satisfied because the pool always contains a root object. The precondition that state has counter or map is satisfied because SyncObjectsPool guarantees this for every yielded message.)
preconditionFailure("state for objectId \(state.objectId) has neither counter nor map")
402
+
}
403
+
404
+
entries[state.objectId]= newEntry
405
+
}
406
+
383
407
/// Removes all entries except the root, and clears the root's data. This is to be used when an `ATTACHED` ProtocolMessage indicates that the only object in a channel is an empty root map, per RTO4b.
Copy file name to clipboardExpand all lines: Sources/AblyLiveObjects/Protocol/ObjectMessage.swift
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ import Foundation
5
5
// This file contains the ObjectMessage types that we use within the codebase. We convert them to and from the corresponding wire types (e.g. `InboundWireObjectMessage`) for sending and receiving over the wire.
6
6
7
7
/// An `ObjectMessage` received in the `state` property of an `OBJECT` or `OBJECT_SYNC` `ProtocolMessage`.
0 commit comments