Index: tests/standalone/io/http_detach_socket_test.dart |
diff --git a/tests/standalone/io/http_detach_socket_test.dart b/tests/standalone/io/http_detach_socket_test.dart |
index a9d18b0a374b0f48edc283a4d27cc89d92309303..7a6c8f25f8e35bec4d402fe8891d9cdae4f6d93e 100644 |
--- a/tests/standalone/io/http_detach_socket_test.dart |
+++ b/tests/standalone/io/http_detach_socket_test.dart |
@@ -105,6 +105,7 @@ void testBadServerDetachSocket() { |
void testClientDetachSocket() { |
ServerSocket.bind("127.0.0.1", 0).then((server) { |
server.listen((socket) { |
+ int port = server.port; |
socket.write("HTTP/1.1 200 OK\r\n" |
"\r\n" |
"Test!"); |
@@ -120,7 +121,7 @@ void testClientDetachSocket() { |
lines.sort(); // Lines 1-3 becomes 3-5 in a fixed order. |
Expect.equals("accept-encoding: gzip", lines[3]); |
Expect.equals("content-length: 0", lines[4]); |
- Expect.equals("host: 127.0.0.1:${server.port}", lines[5]); |
+ Expect.equals("host: 127.0.0.1:${port}", lines[5]); |
socket.close(); |
}); |
server.close(); |