connectionsClosed method
Ends each HTTP/2 connection once its streams are done (with a GOAWAY), and waits for the HTTP/1 connections to close too.
Implementation
@override
Future<void> connectionsClosed() async {
var http1 = _artificial?.http1;
await Future.wait([
for (var connection in _connections.toList())
connection.finish().catchError((_) {}),
if (http1 != null) allConnectionsClosed(http1),
]);
}