diff --git a/pkg/dartdev/bin/dartdev.dart b/pkg/dartdev/bin/dartdev.dart index 7c096eef57c1..10751b1ca730 100644 --- a/pkg/dartdev/bin/dartdev.dart +++ b/pkg/dartdev/bin/dartdev.dart @@ -5,8 +5,15 @@ import 'dart:isolate'; import 'package:dartdev/dartdev.dart'; +import 'package:pub/src/http.dart'; /// The entry point for dartdev. Future main(List 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(); + } }