Index: tests/standalone/io/socket_exception_test.dart |
diff --git a/tests/standalone/io/socket_exception_test.dart b/tests/standalone/io/socket_exception_test.dart |
index 6381558f72a01ddcb5df0e0a2e6c541d670bf636..58abb85cbec6aee0fd5c358261195b25902aaf66 100644 |
--- a/tests/standalone/io/socket_exception_test.dart |
+++ b/tests/standalone/io/socket_exception_test.dart |
@@ -40,6 +40,7 @@ class SocketExceptionTest { |
asyncStart(); |
ServerSocket.bind("127.0.0.1", 0).then((server) { |
Socket.connect("127.0.0.1", server.port).then((socket) { |
+ socket.destroy(); |
server.close(); |
server.listen( |
(incoming) => Expect.fail("Unexpected socket"), |
@@ -53,8 +54,11 @@ class SocketExceptionTest { |
ServerSocket.bind("127.0.0.1", 0).then((server) { |
Socket.connect("127.0.0.1", server.port).then((socket) { |
server.listen( |
- (incoming) => server.close(), |
- onDone: asyncEnd); |
+ (incoming) { |
+ incoming.destroy(); |
+ socket.destroy(); |
+ server.close(); |
+ }, onDone: asyncEnd); |
}); |
}); |
} |