We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17fc8b5 commit 5a37b79Copy full SHA for 5a37b79
tests/standalone/io/many_pending_secure_sockets_test.dart
@@ -7,11 +7,18 @@
7
import "dart:io";
8
9
test(int i) async {
10
- var socket = await RawSecureSocket.connect("www.google.com", 443);
11
- await Future.delayed(
12
- Duration(seconds: 6), // More than the thread pool timeout.
13
- );
14
- socket.close();
+ try {
+ var socket = await RawSecureSocket.connect("www.google.com", 443);
+ await Future.delayed(
+ Duration(seconds: 6), // More than the thread pool timeout.
+ );
15
+ socket.close();
16
+ } catch (e, st) {
17
+ // Ignore failures from the remote side rejecting/closing the connection.
18
+ if (!e.toString().contains("Connection reset by peer")) {
19
+ rethrow;
20
+ }
21
22
}
23
24
main() async {
0 commit comments