On Mon, 19 Dec 2016 14:38:09 -0800, bradl...@dal.ca wrote:
> This is Rakudo version 2016.11 built on MoarVM version 2016.11
> implementing Perl 6.c.
> 
> Here is a program that demonstrates the problem.
> 
> use v6;
> 
> my $s = IO::Socket::INET.new(:host('irc.freenode.net'), :port(6667));
> $s.print("QUIT\r\n");
> for $s.lines { say $_; }
> say so $s.print("this should fail");
> 

Note that if you explicitly close the socket, this works as expected.

use v6;

my $s = IO::Socket::INET.new(:host('irc.freenode.net'), :port(6667));
$s.print("QUIT\r\n");
for $s.lines { say $_; }
$s.close;
say so $s.print("this should fail");

:rajaniemi.freenode.net NOTICE * :*** Looking up your hostname...
:rajaniemi.freenode.net NOTICE * :*** Checking Ident
:rajaniemi.freenode.net NOTICE * :*** Couldn't look up your hostname
:rajaniemi.freenode.net NOTICE * :*** No Ident response
ERROR :Closing Link: 127.0.0.1 (Client Quit)
False

-- 
Will "Coke" Coleda

Reply via email to