close method

void close()

Implementation

void close() {
  _eventSource.close();
  // If the initial connection was never established. Add a listener so close
  // adds a done event to [sink].
  if (!_onConnected.isCompleted) _outgoingController.stream.drain<void>();
  _incomingController.close();
  _outgoingController.close();
}