Skip Menu |
 

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

Report information
The Basics
Id: 71768
Status: resolved
Priority: 0/
Queue: IO-Async

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

Bug Information
Severity: Normal
Broken in: 0.44
Fixed in: 0.45

Attachments


Subject: on_notifier callback when using ->listen on an existing socket
Download (untitled) / with headers
text/plain 511b
Hi, Ran into a minor issue when playing around passing listening sockets between forks - line 998 in IO::Async::Loop pulls out the on_notifier callback: my $on_notifier = delete $params{on_notifier}; and then line 1020-1022 hit that if the socket's already in listening state: if( $listener->is_listening ) { $on_notifier->( $listener ); } but if on_notifier isn't provided, that'll fail since $on_notifier is undef. Just guarding that with an if() is probably sufficient here? cheers, Tom
Subject: 2011-10-18-on_notifier.patch
=== modified file 'lib/IO/Async/Loop.pm' --- lib/IO/Async/Loop.pm 2011-10-15 12:49:35 +0000 +++ lib/IO/Async/Loop.pm 2011-10-18 21:42:37 +0000 @@ -1018,7 +1018,7 @@ $self->add( $listener ); if( $listener->is_listening ) { - $on_notifier->( $listener ); + $on_notifier->( $listener ) if $on_notifier; } else { my $on_listen = delete $params{on_listen};
Download (untitled) / with headers
text/plain 238b
On Tue Oct 18 17:44:37 2011, TEAM wrote: Show quoted text
> but if on_notifier isn't provided, that'll fail since $on_notifier is > undef. Just guarding that with an if() is probably sufficient here?
Fixed in bzr -r908. Will be in 0.45. -- Paul Evans
Fixed in 0.45. -- Paul Evans


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.