close method

void close()

Closes the DataProducer.

Implementation

void close() {
  if (closed) return;

  _logger.debug('close()');

  closed = true;

  dataChannel.close();

  emit('@close');

  // Emit observer event.
  observer.safeEmit('close');
}