Skip to content

Commit

Permalink
Clarify when Client.close must be called (#1255)
Browse files Browse the repository at this point in the history
  • Loading branch information
brianquinlan authored Jul 4, 2024
1 parent 719dc5f commit 4178b67
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkgs/http/lib/src/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,11 @@ abstract interface class Client {

/// Closes the client and cleans up any resources associated with it.
///
/// It's important to close each client when it's done being used; failing to
/// do so can cause the Dart process to hang.
/// Some clients maintain a pool of network connections that will not be
/// disconnected until the client is closed. This may cause programs using
/// using the Dart SDK (`dart run`, `dart test`, `dart compile`, etc.) to
/// not terminate until the client is closed. Programs run using the Flutter
/// SDK can still terminate even with an active connection pool.
///
/// Once [close] is called, no other methods should be called. If [close] is
/// called while other asynchronous methods are running, the behavior is
Expand Down

0 comments on commit 4178b67

Please sign in to comment.