close method

  1. @override
  2. @mustCallSuper
Future<void> close({
  1. bool force = false,
})
inherited

Closes the resource and all connected objects.

Implementation

@override
@mustCallSuper
Future<void> close({bool force = false}) async {
  try {
    _inner?.close(force: force);
    _inner = null;
    for (final connection in _http2Connections.values) {
      if (force) {
        unawaited(connection.terminate());
      } else {
        unawaited(connection.finish());
      }
    }
  } finally {
    _http2Connections.clear();
  }
}