friends-of-reactphp / stomp

STOMP bindings for ReactPHP.
MIT License
115 stars 42 forks source link

Client creation failure does not trigger the promise rejection #9

Closed romainneutron closed 11 years ago

romainneutron commented 11 years ago

In the following code, the exit('error'); is never triggered

The bug occurs whenever a process is listening to the port or not.

$loop = React\EventLoop\Factory::create();
$factory = new React\Stomp\Factory($loop);
$client = $factory->createClient(array('port' =>80));

$client
    ->connect()
    ->then(
         function () {},
         function () { exit("error"); }
    );

$loop->run();
igorw commented 11 years ago

Fixed by #12.