Skip to content

Commit

Permalink
Fix successful TCP connect
Browse files Browse the repository at this point in the history
  • Loading branch information
TooTallNate committed Jan 9, 2024
1 parent 5b4effb commit 43190bb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/ten-seahorses-change.md
@@ -0,0 +1,5 @@
---
'nxjs-runtime': patch
---

Fix successful TCP connect
3 changes: 2 additions & 1 deletion source/poll.c
Expand Up @@ -163,7 +163,7 @@ void nx_tcp_connect_cb(nx_poll_t *p, nx_watcher_t *watcher, int revents)
else
{
/* Error during connect. */
req->err = errno;
req->err = so_error;
}
req->callback(p, req);
}
Expand Down Expand Up @@ -210,6 +210,7 @@ int nx_tcp_connect(nx_poll_t *p, nx_connect_t *req, const char *ip, int port, nx
}
errno = 0;

req->err = 0;
req->fd = sockfd;
req->events = POLLOUT | POLLERR;
req->watcher_callback = nx_tcp_connect_cb;
Expand Down

0 comments on commit 43190bb

Please sign in to comment.