reactphp / socket

Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP.

Home Page:https://reactphp.org/socket/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ignoring exceptions from HappyEyeBallsConnectionBuilder::resolve

Provoker opened this issue · comments

HappyEyeBallsConnectionBuilder::connect ignores rejection HappyEyeBallsConnectionBuilder::resolve if there is no A or AAAA dns entry.

This fact has no effect in the current implementation of promise, but if you add a detector of unhandled rejections, it will cause problems.
And based on your plans, this detector will still be added (reactphp/promise#170) and the problem will still have to be corrected.

We are already using our own implementation of handling uncaught rejections at the moment and this problem prevents us from upgrading to a version higher than 1.3.0.

Hey @Provoker thank you for reporting this bug. But "issue" might have slipped by us when implementing Happy Eyeballs. You can still update to 1.6, and disable happy eyeballs as documented at https://reactphp.org/socket/#connector with the following snippet:

$connector = new React\Socket\Connector($loop, array(
    'happy_eyeballs' => false
));

I'll have a look at this this week and come up with a fix 👍

@Provoker just filed #251 to fix this