Skip to content

Commit ceb246c

Browse files
committed
[ECO-5517] Adjusted channel state checks prior to channel modes for read
and write objects operations
1 parent 631a5dc commit ceb246c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • live-objects/src/main/kotlin/io/ably/lib/objects

live-objects/src/main/kotlin/io/ably/lib/objects/Helpers.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ internal fun LiveObjectsAdapter.setChannelSerial(channelName: String, protocolMe
4949

5050
// Spec: RTLO4b1, RTLO4b2
5151
internal fun LiveObjectsAdapter.throwIfInvalidAccessApiConfiguration(channelName: String) {
52-
throwIfMissingChannelMode(channelName, ChannelMode.object_subscribe)
5352
throwIfInChannelState(channelName, arrayOf(ChannelState.detached, ChannelState.failed))
53+
throwIfMissingChannelMode(channelName, ChannelMode.object_subscribe)
5454
}
5555

5656
internal fun LiveObjectsAdapter.throwIfInvalidWriteApiConfiguration(channelName: String) {
5757
throwIfEchoMessagesDisabled()
58-
throwIfMissingChannelMode(channelName, ChannelMode.object_publish)
5958
throwIfInChannelState(channelName, arrayOf(ChannelState.detached, ChannelState.failed, ChannelState.suspended))
59+
throwIfMissingChannelMode(channelName, ChannelMode.object_publish)
6060
}
6161

6262
internal fun LiveObjectsAdapter.throwIfUnpublishableState(channelName: String) {

0 commit comments

Comments
 (0)