Skip to content

Commit

Permalink
[beta] Shut down pub http client after running dartdev
Browse files Browse the repository at this point in the history
Bug: #55289
Cherry-pick: https://dart-review.googlesource.com/c/sdk/+/361364
Cherry-pick: https://dart-review.googlesource.com/c/sdk/+/362360
Cherry-pick-request: #55402
Change-Id: I61548d0b223167b769a27ac6ab956c4fd42a7be6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/361562
Reviewed-by: Ben Konyi <[email protected]>
Commit-Queue: Sigurd Meldgaard <[email protected]>
  • Loading branch information
sigurdm authored and Commit Queue committed Apr 15, 2024
1 parent 66b9bf5 commit 749aa52
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/dartdev/bin/dartdev.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,15 @@
import 'dart:isolate';

import 'package:dartdev/dartdev.dart';
import 'package:pub/src/http.dart';

/// The entry point for dartdev.
Future<void> main(List<String> args, SendPort? port) async {
await runDartdev(args, port);
try {
await runDartdev(args, port);
} finally {
// TODO(https://github.com/dart-lang/pub/issues/4209). Handle this in a more
// structured way.
globalHttpClient.close();
}
}

0 comments on commit 749aa52

Please sign in to comment.