Closed
Description
In cupertino_http, cancelling the stream on a StreamedResponse does not close the underlying connection.
final client = CupertinoClient.fromSessionConfiguration(URLSessionConfiguration.ephemeralSessionConfiguration());
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();
After cancelling the stream subscription, the connection remains open until the full body is received:
In contrast, the standard IOClient closes the connection when the stream subscription is cancelled. Notice the "Timespan":
I opened the same issue for cronet_http here.