Skip to content

Commit

Permalink
Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
brianquinlan committed Dec 4, 2023
1 parent 0ad674b commit 1dd2fd0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ Future<Map<String, List<String>>> sentHeaders(
await request.response.close();
});

final task = session.dataTaskWithRequest(
URLRequest.fromUrl(Uri.parse('http://localhost:${server.port}')))
final task = session.dataTaskWithRequest(URLRequest.fromUrl(
Uri(scheme: 'http', host: 'localhost', port: server.port)))
..resume();
while (task.state != URLSessionTaskState.urlSessionTaskStateCompleted) {
// Let the event loop run.
await Future<void>.delayed(const Duration());
await pumpEventQueue();
}

await server.close();
Expand Down

0 comments on commit 1dd2fd0

Please sign in to comment.