Skip to content

Commit

Permalink
syscalls: block connect() on EINPROGRESS
Browse files Browse the repository at this point in the history
  • Loading branch information
jewelcodes committed Jan 13, 2025
1 parent 1eaf394 commit 9c3c56b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/syscalls/dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ void syscallDispatchSocket(SyscallRequest *req) {
void syscallDispatchConnect(SyscallRequest *req) {
if(syscallVerifyPointer(req, req->params[1], req->params[2])) {
int status = connect(req->thread, req->params[0], (const struct sockaddr *)req->params[1], req->params[2]);
if(status == -EAGAIN || status == -EWOULDBLOCK) {
if(status == -EAGAIN || status == -EWOULDBLOCK || status == -EINPROGRESS) {
req->unblock = false;
req->busy = false;
req->queued = true;
Expand Down

0 comments on commit 9c3c56b

Please sign in to comment.