leaveOpenTopic method

  1. @internal
void leaveOpenTopic(
  1. String topic
)

Unsubscribe from channels with the specified topic.

Implementation

@internal
void leaveOpenTopic(String topic) {
  final dupChannel = channels.firstWhereOrNull(
    (c) => c.topic == topic && (c.isJoined || c.isJoining),
  );
  if (dupChannel != null) {
    log('transport', 'leaving duplicate topic "$topic"');
    dupChannel.unsubscribe();
  }
}