-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Server disconnection are not detected #24
Comments
There is currently no way to prevent this. Heartbeat or receipt could improve this |
It appears that I added an exit (that is never reached when I shutdown RabbitMQ) in
Is it a know issue @igorw ? |
This issue is new to me. But @cboden mentioned a similar issue related to libev and libuv loops. Which loop are you using? |
I'm using libevent |
The error can be reproduced with a simple script : $fd = stream_socket_client('tcp://localhost:61613', $errno, $errstr);
stream_set_blocking($fd, 0);
$initialized = false;
fwrite($fd, "CONNECT\naccept-version:1.1\nhost:/\nlogin:guest\npasscode:guest\n\n\x00");
while (true) {
$read = fread($fd, 1024);
if ($read) {
echo "Read : $read\n";
if (0 === strpos($read, "CONNECTED\n")) {
$initialized = true;
echo "Initialized !\n";
}
}
if ($initialized) {
echo "Sending frame...\n";
fwrite($fd, "SEND\ndestination:/topic/foo\ncontent-length:10\ncontent-type:text/plain\n\nle message\x00");
usleep(500000);
}
} when running this script and shutdown RabbitMQ produces :
|
Fixes friends-of-reactphp#24 without throwing exception as in friends-of-reactphp#25
Fixes friends-of-reactphp#24 without throwing exception as in friends-of-reactphp#25
For example, run
php examples/publish.php rabbitmq
, shutdown Rabbit MQ server, see that it continues to send frames, no exception thrownThe text was updated successfully, but these errors were encountered: