Skip Menu |
 

This queue is for tickets about the IO-Socket-IP CPAN distribution.

Report information
The Basics
Id: 101455
Status: resolved
Priority: 0/
Queue: IO-Socket-IP

People
Owner: Nobody in particular
Requestors: TEAM [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.34
Fixed in: 0.36



Subject: ->peerhost/->peerport exception on IO::Async::Listener handle?
Download (untitled) / with headers
text/plain 399b
See test script - seems odd that this would raise an exception, but if it's expected behaviour I'd suggest maybe changing the message or documenting what it means. At the moment it reports: addr is not a string at .../IO/Socket/IP.pm line 750 so the error is probably coming from Socket::getnameinfo - if it's not a string, (a) what is it, and (b) why isn't it the expected value? cheers, Tom
Subject: io-socket-ip-peerhost.t
use strict; use warnings; use Test::More; use Test::Fatal; use IO::Async::Loop; my $loop = IO::Async::Loop->new; my ($listener) = $loop->listen( addr => { family => "inet", socktype => "stream", }, on_accept => sub { note "Accept: @_"; } )->get; my $sock = $listener->read_handle; note $sock; is(exception { note "Server listening on " . join(':', $sock->peerhost, $sock->peerport); }, undef, 'no exception when checking peerhost/peerport'); done_testing;
Duplicate. Please merge into linked ticket.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.