OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 import 'dart:async'; | 5 import 'dart:async'; |
6 import 'dart:io'; | 6 import 'dart:io'; |
7 | 7 |
8 import 'package:async_helper/async_helper.dart'; | 8 import 'package:async_helper/async_helper.dart'; |
9 import 'package:expect/expect.dart'; | 9 import 'package:expect/expect.dart'; |
10 | 10 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 socket2.first.then((socket) async { | 103 socket2.first.then((socket) async { |
104 await socket.drain(); | 104 await socket.drain(); |
105 await socket.close(); | 105 await socket.close(); |
106 asyncEnd(); | 106 asyncEnd(); |
107 }); | 107 }); |
108 | 108 |
109 Socket client = await Socket.connect(host, socket2.port); | 109 Socket client = await Socket.connect(host, socket2.port); |
110 await client.close(); | 110 await client.close(); |
111 await client.drain(); | 111 await client.drain(); |
112 | 112 |
| 113 // Close the second server socket. |
| 114 await socket2.close(); |
113 asyncEnd(); | 115 asyncEnd(); |
114 } | 116 } |
115 | 117 |
116 main() async { | 118 main() async { |
117 asyncStart(); | 119 asyncStart(); |
118 | 120 |
119 await retry(() async { | 121 await retry(() async { |
120 await testBindDifferentAddresses(InternetAddress.ANY_IP_V6, | 122 await testBindDifferentAddresses(InternetAddress.ANY_IP_V6, |
121 InternetAddress.ANY_IP_V4, | 123 InternetAddress.ANY_IP_V4, |
122 true, | 124 true, |
(...skipping 13 matching lines...) Expand all Loading... |
136 negTestBindSharedMismatch(host, false); | 138 negTestBindSharedMismatch(host, false); |
137 negTestBindSharedMismatch(host, true); | 139 negTestBindSharedMismatch(host, true); |
138 | 140 |
139 negTestBindV6OnlyMismatch(host, true); | 141 negTestBindV6OnlyMismatch(host, true); |
140 negTestBindV6OnlyMismatch(host, false); | 142 negTestBindV6OnlyMismatch(host, false); |
141 | 143 |
142 testListenCloseListenClose(host); | 144 testListenCloseListenClose(host); |
143 } | 145 } |
144 asyncEnd(); | 146 asyncEnd(); |
145 } | 147 } |
OLD | NEW |