blob: ed3c67e00cb7b276ae997b07de4b176162d36637 [file] [log] [blame]
// Copyright (c) 2019, 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.
// Testing that HttpClient throws an exception if a connection is opened after
// the client is closed.
import "dart:io";
import "package:expect/expect.dart";
void main() {
HttpServer.bind("", 0).then((server) {
server.listen((request) {
request.listen((_) {});
var client = new HttpClient();
Expect.throws<StateError>(() =>"", server.port, "/"));