Files
sdk/pkg/dartdev/bin/dartdev.dart
Sigurd Meldgaard 6eb220bbcf Close pub http client in finally block
Change-Id: I63efbdbcaeef787d07ce38c44d30425cdc96c65d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/362360
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2024-04-11 13:53:08 +00:00

20 lines
606 B
Dart

// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
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 {
try {
await runDartdev(args, port);
} finally {
// TODO(https://github.com/dart-lang/pub/issues/4209). Handle this in a more
// structured way.
globalHttpClient.close();
}
}