Closed
Description
In cronet_http, cancelling the stream on a StreamedResponse does not close the underlying connection.
final engine = CronetEngine.build(cacheMode: CacheMode.disabled);
final client = CronetClient.fromCronetEngine(engine, closeEngine: true);
final request = Request('GET', Uri.parse('https://cachefly.cachefly.net/100mb.test'));
final streamedResponse = await client.send(request);
final streamSubscription = streamedResponse.stream.listen(null);
await Future.delayed(const Duration(seconds: 5));
await streamSubscription.cancel();
Despite the stream subscription being cancelled, the connection continues to remain active until the full body is received:
In contrast, the standard IOClient closes the connection when the stream subscription is cancelled. Notice the "Timespan":