Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
brianquinlan committed Oct 2, 2024
1 parent 8569676 commit 7f6608d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkgs/cupertino_http/lib/src/cupertino_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -842,11 +842,11 @@ class URLSession extends _ObjectHolder<ncb.NSURLSession> {

static void _decrementTaskCount() {
assert(_taskCount > 0);
assert(_port != null);
--_taskCount;
if (_taskCount == 0 && _port != null) {
if (_taskCount == 0) {
_port?.close();
_port = null;
_taskCount = 0;
}
}

Expand Down

0 comments on commit 7f6608d

Please sign in to comment.