Skip Menu |

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

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

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

Bug Information
Severity: (no value)
Broken in: 0.14
Fixed in: 0.15



CC: TEAM [...] cpan.org
Subject: SSL_listen confuses accept failures with ssl failures
SSL_listen has a block that looks like: $listener->$cleartext_acceptor($listen_sock)->then(sub{ ... $loop->SSL_upgrade(...) })->else(sub{ ... }); This invokes the "else" even if the error comes from the cleartext acceptor, instead of the SSL_upgrade, confusing users. I think it should be: $listener->$cleartext_acceptor($listen_sock)->then(sub{ ... $loop->SSL_upgrade(...)->else(sub{ ... }); }); This way, only SSL errors show up as such.
Seems sensible. Patched. -- Paul Evans
Subject: rt102405.patch
=== modified file 'lib/IO/Async/SSL.pm' --- lib/IO/Async/SSL.pm 2015-04-04 13:39:29 +0000 +++ lib/IO/Async/SSL.pm 2015-04-04 13:42:05 +0000 @@ -447,11 +447,11 @@ $loop->SSL_upgrade( _SSL_args( SSL_server => 1, %ssl_params ), handle => ( $stream || $socket ), - ) - })->else( sub { - my ( $failure ) = @_; - $on_ssl_error->( $failure ) if $on_ssl_error; - return Future->new->fail( $failure, ssl => ); + )->else( sub { + my ( $failure ) = @_; + $on_ssl_error->( $failure ) if $on_ssl_error; + return Future->new->fail( $failure, ssl => ); + }); }); };