Subject: | Incorrect use of maybe_invoke_event in IO::Async::Listener::on_read_ready() |
Date: | Sat, 04 Mar 2017 21:48:30 +0200 |
To: | bug-IO-Async [...] rt.cpan.org |
From: | chohag [...] jtan.com |
This looks like a natural language diff to me...
The catch block at the end of on_read_ready() is expected to return a
Future but maybe_invoke_event() wraps its arguments up an an arrayref.
Replace the last double-line of the catch block with:
my $maybe = $self->maybe_invoke_event( on_accept_error => $socket, $dollarbang );
$maybe ? @$maybe
: $self->invoke_error( "accept() failed - $dollarbang", accept => $socket, $dollarbang );
Matthew