We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4f6c20 commit 431da8cCopy full SHA for 431da8c
packages/common/lib/src/network/http_client.dart
@@ -82,4 +82,9 @@ final class HttpClient {
82
return await http.Response.fromStream(streamedResponse)
83
.timeout(_httpProperties.readTimeout);
84
}
85
+
86
+ /// Close the underlying HTTP client and free its resources.
87
+ void close() {
88
+ _client.close();
89
+ }
90
packages/common_client/lib/src/data_sources/streaming_data_source.dart
@@ -160,6 +160,7 @@ final class StreamingDataSource implements DataSource {
160
_stopped = true;
161
_pollGeneration++;
162
_pollActiveSince = null;
163
+ _pollingClient.close();
164
_dataController.close();
165
166
0 commit comments