Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions lib/src/common/src/channels.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ abstract class Channels<ChannelType> extends Iterable<ChannelType> {
/// Releases a [RestChannel] or [RealtimeChannel] object with a specified
/// [name], deleting it.
///
/// It also removes any listeners associated with the channel. To release a
/// channel, the [ChannelState] must be `INITIALIZED`, `DETACHED`, or
/// `FAILED`.
/// It also removes any listeners associated with the channel. A realtime
/// channel should only be released when it is in the `INITIALIZED`,
/// `DETACHED`, or `FAILED` state; releasing a realtime channel in any other
/// state is deprecated and will throw an error in the next major version.
void release(String name) {
_channels.remove(name);
}
Expand Down
7 changes: 4 additions & 3 deletions lib/src/platform/src/realtime/realtime_channels.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ class RealtimeChannels extends Channels<RealtimeChannel> {

/// Releases a [RealtimeChannel] object with a specified [name], deleting it.
///
/// It also removes any listeners associated with the channel. To release a
/// channel, the [ChannelState] must be `INITIALIZED`, `DETACHED`, or
/// `FAILED`.
/// It also removes any listeners associated with the channel. A realtime
/// channel should only be released when it is in the `INITIALIZED`,
/// `DETACHED`, or `FAILED` state; releasing a realtime channel in any other
/// state is deprecated and will throw an error in the next major version.
@override
void release(String name) {
realtime.invoke<void>(PlatformMethod.releaseRealtimeChannel, {
Expand Down
Loading