closeServer method

  1. @override
Future<void> closeServer(
  1. SecureServerSocket server
)
override

Also closes the connections still open, HTTP/2 and HTTP/1.

Implementation

@override
Future<void> closeServer(SecureServerSocket server) async {
  await server.close();
  await _artificial?.http1.close(force: true);
  await Future.wait([
    for (var connection in _connections.toList())
      connection.terminate().catchError((_) {}),
  ]);
}