From 9c3c56b9b1c6ba8b7f736c161823200ccb63fd51 Mon Sep 17 00:00:00 2001 From: jewelcodes Date: Mon, 13 Jan 2025 17:55:53 -0500 Subject: [PATCH] syscalls: block connect() on EINPROGRESS --- src/syscalls/dispatch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/syscalls/dispatch.c b/src/syscalls/dispatch.c index 5f02333..13b5513 100644 --- a/src/syscalls/dispatch.c +++ b/src/syscalls/dispatch.c @@ -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;