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.