close method

  1. @override
void close()

Implementation

@override
void close() {
  if (_closed) return;
  _closed = true;

  final lc = localRecvChannel;
  if (lc != null) {
    (lc.buf as BroadcastRing<T>).removeSubscriber(_cursor!);
  }

  closeRemote();
  final local = ChannelRegistry.get(channelId);
  if (local != null) {
    local.dropReceiver();
  }
}