closeWithError method
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();
}