about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--t/nntpd-tls.t8
1 files changed, 6 insertions, 2 deletions
diff --git a/t/nntpd-tls.t b/t/nntpd-tls.t
index a11a0dd9..a16cc015 100644
--- a/t/nntpd-tls.t
+++ b/t/nntpd-tls.t
@@ -187,8 +187,12 @@ for my $args (
 
         my $s = tcp_connect($nntps);
         syswrite($s, '->accept_SSL_ will fail on this!');
-        ok(!sysread($s, my $rbuf, 128), 'EOF or ECONNRESET on ->accept_SSL fail');
-
+        my @r;
+        do { # some platforms or OpenSSL versions need an extra read
+                push @r, sysread($s, my $rbuf, 128);
+        } while ($r[-1] && @r < 2);
+        ok(!$r[-1], 'EOF or ECONNRESET on ->accept_SSL fail') or
+                diag explain(\@r);
         $c = undef;
         $td->kill;
         $td->join;