# New Ticket Created by  Michael Lowe 
# Please include the string:  [perl #131778]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=131778 >


Hello,

I've run into a bug in IO::Socket::INET.

Windows 10
perl6 -v
This is Rakudo version 2017.04.3 built on MoarVM version
2017.04-53-g66c6dda implementing Perl 6.c.

When creating a new IO::Socket::INET it works to some sites but fails to
others. To illustrate the bug, from the REPL:

> IO::Socket::INET.new(host => 'www.google.com', port => 443)
Failed to connect: connection timed out
  in block <unit> at <unknown file> line 1

> IO::Socket::INET.new(host => 'www.google.com', port => 80)
Failed to connect: connection timed out
  in block <unit> at <unknown file> line 1

> IO::Socket::INET.new(host => 'gtk-dlls.p6c.org', port => 443)
Failed to connect: connection timed out
  in block <unit> at <unknown file> line 1

> IO::Socket::INET.new(host => 'stackoverflow.com', port => 443)
IO::Socket::INET.new(encoding => "utf8", host => "stackoverflow.com", port
=> 443, localhost => Str, localport => Int, backlog => Int, listening =>
Bool, family => 2, proto => 6, type => 1, nl-in => $["\n", "\r\n"], ins =>
0)

I've tried a variety of https sites and it is very hit or miss as to which
ones work and which ones do not.

This problem initially showed up because the OpenSSL tests use a connection
to google.com. And that test failed:

===> Testing: OpenSSL:ver('0.1.14'):auth('github:sergot')
Testing with plugin: Zef::Service::TAP+{<anon|129467376>}
t\01-basic.t ........... ok
Failed to connect: connection timed out
  in sub fetch at t\02-socket.t line 25
  in block <unit> at t\02-socket.t line 6

Line 25 in 02-socket.t is

my $s = IO::Socket::INET.new(:$host, :port(443));

where host is google.com.

A similar failure happens in the GTK::Simple build process. It tries to
download some files and the IO::Socket::INET.new(...) call fails.

Thank you.
Mike

Reply via email to