-
Notifications
You must be signed in to change notification settings - Fork 668
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
Socket Freezed on RabbitMq disconnection on windows #297
Comments
The implementation changed from |
Hi. I just made a simple change on the code using the exception set. I am attaching the patch file here. If you want we can provide some assist to test and / or mantain the windows part of the code. Left file: E:\Temp\rabbitmq-c-master\librabbitmq\amqp_socket.c
Right file: E:\projetos\rabbitmq-c-master\librabbitmq\amqp_socket.c
305a306
> fd_set fdexceptset;
314a316,318
> FD_ZERO(&fdexceptset);
> FD_SET(fd, &fdexceptset);
>
323c327
< res = select(fd + 1, &fds, NULL, NULL, tvp);
---
> res = select(fd + 1, &fds, NULL, &fdexceptset, tvp);
326c330
< res = select(fd + 1, NULL, &fds, NULL, tvp);
---
> res = select(fd + 1, NULL, &fds, &fdexceptset, tvp);
328a333,335
> if (FD_ISSET(fd, &fdexceptset))
> return AMQP_STATUS_SOCKET_ERROR;
>
332c339
< return AMQP_STATUS_TIMEOUT;
---
> goto start_select; Thank you, Allan |
oh my. Can I send you the patch in any other way? See you! |
If you have a patch, please open a pull-request. For my own reference, |
just commited the code. Is anything else I should do? |
Could you open a pull-request with the changed code? Here's some instructions on how to get this done if you're not familiar: |
When doing a nonblocking connect() on win32, select() reports failure using exceptfds instead of writefds. Allow this narrow case when doing a non-blocking connect on Win32. See: https://msdn.microsoft.com/en-us/library/windows/desktop/ms740141(v=vs.85).aspx Fixes #297
@allancomar could you try pulling down the branch referenced in #306 and see if it fixes your issue? |
When doing a nonblocking connect() on win32, select() reports failure using exceptfds instead of writefds. Allow this narrow case when doing a non-blocking connect on Win32. See: https://msdn.microsoft.com/en-us/library/windows/desktop/ms740141(v=vs.85).aspx Fixes #297
When doing a nonblocking connect() on win32, select() reports failure using exceptfds instead of writefds. Allow this narrow case when doing a non-blocking connect on Win32. See: https://msdn.microsoft.com/en-us/library/windows/desktop/ms740141(v=vs.85).aspx Fixes #297
Sry Alan. I just miss that. will do it ASAP ;) On Wed, Oct 14, 2015 at 12:48 AM, Alan Antonuk notifications@github.com
Allan. |
I met same problem on Linux , when use SimpleAMQPClient to create channel by CreateFromUri, and the version of rabbitmq-c is v0.7.1 |
Hi. Looking at the differences between master version and 0.6 we notice that you changed the select to use an infinite time on code:
If we try to connect to a closed port this code in windows stays on the select even if the port got open after ( like when you restart rabbitMq).
Do you have any sugestion to address this behavior?
Thanks, Allan
The text was updated successfully, but these errors were encountered: