-
Notifications
You must be signed in to change notification settings - Fork 672
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
"recv_with_timeout" in "amqp_try_recv" set timeout to 0,cause infinite waiting for message! #788
Comments
i am using version 0.13.0 now. |
I've had a chance to look at the code path in question. The intent of Note that
If you still happen to have the example in question: where in the rabbitmq-c code is it being blocked (if you have a stack-trace that'd be helpful)? And if its blocked in |
hello,
as line 732 in amqp_socket.c
the flollowing code within amqp_try_recv return the amqp_time_infinite(),and then recv_with_timeout will wait infinitely.
res = amqp_time_from_now(&timeout, &(struct timeval){0});
I am currently pushing messages to the RabbitMQ server via VPN. If the VPN connection is unexpectedly disconnected during the communication process, the amqp_basic_publish function will not immediately return an error message. By checking the underlying TCP connection status using "netstat", it can be observed that the status remains as "ESTABLISHED",and it will close automaticlly in 15 to 20 minutes which is decided by linux. Upon examining the source code, it appears that an infinite wait is set in the mentioned section, though the reasoning behind it is unclear. Could you please confirm if it is appropriate to modify it as follows, or would there be any other implications? Thank you.
res = amqp_time_s_from_now(&timeout, amqp_heartbeat_recv(state));
The text was updated successfully, but these errors were encountered: