Skip to content
Snippets Groups Projects
Commit 5a45abac authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Fix Socket.connect()

Broken with the poll() update
parent d9f3c97d
No related branches found
No related tags found
No related merge requests found
......@@ -865,7 +865,7 @@ js_connect(JSContext *cx, uintN argc, jsval *arglist)
result = ERROR_VALUE;
if(result == EWOULDBLOCK || result == EINPROGRESS) {
result = ETIMEDOUT;
if (socket_readable(p->sock, timeout)) {
if (socket_writable(p->sock, timeout)) {
int so_error = -1;
socklen_t optlen = sizeof(so_error);
if(getsockopt(p->sock, SOL_SOCKET, SO_ERROR, (void*)&so_error, &optlen) == 0 && so_error == 0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment