closeWithError method

void closeWithError(
  1. SSHError error, [
  2. StackTrace? stackTrace
])

Implementation

void closeWithError(SSHError error, [StackTrace? stackTrace]) {
  printDebug?.call('SSHTransport.closeWithError $error');
  if (isClosed) return;
  _socketSubscription?.cancel();
  _socketSubscription = null;
  _doneCompleter.completeError(error, stackTrace ?? StackTrace.current);
  socket.destroy();
}