I'm running into a strange issue with libuv, which I hadn't seen before. I'm connecting using a non-TCP socket (it's actually Bluetooth on Linux) to a remote device. I'm creating the socket, setting it non-blocking, and doing the connect. The connect, of course, sets errno to EINPROGRESS, which is fine - I ignore it and return. Now, since this isn't a TCP socket, I'm using uv_poll_init() and uv_poll_start() to poll for the connect to occur, like so:
this->poll_handle = new uv_poll_t; uv_poll_init_socket(uv_default_loop(), this->poll_handle, this->sock); uv_poll_start(this->poll_handle, UV_WRITABLE, onConnect); All of this used to work (at least a couple of months ago it did). However, I just tried it again and what's happening is that my callback function (onConnect) is getting called with a status of -1, and the errno is EINPROGRESS. I did an strace on the calls, just to make sure what was happening, and it looks like the epoll() is returning immediately because it sees the EINPROGRESS error on the socket. This definitely worked before, so I'm not sure what changed. However, I really need either for the uv_poll calls to ignore EINPROGRESS, or some way of working around this so I can poll for the connect. I've tried checking for EINPROGRESS in my callback and calling uv_poll_start() again, but that just causes it to error out with EEXIST. Any help would be greatly appreciated. -Jack Lund -- You received this message because you are subscribed to the Google Groups "libuv" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/libuv. For more options, visit https://groups.google.com/groups/opt_out.
