Commit Diff
Diff:
ee0aac2f009a841246854bc189070f07803d0d2e
2755163381207edb50e1db495c9994f88471433c
Commit:
2755163381207edb50e1db495c9994f88471433c
Tree:
aa498bbc8f287c6be51f3455f135428b772e97e1
Author:
Omar Polo <op@omarpolo.com>
Date:
Wed May 25 18:03:07 2022 UTC
Message:
handle mark_nonblock_cloexec failure
commit - ee0aac2f009a841246854bc189070f07803d0d2e
commit + 2755163381207edb50e1db495c9994f88471433c
blob - 48ce206255dcef21d57c0556dcd570f965041aea
blob + d6ae46cf726c29cbf5e90363110c7a84971a9b0b
--- net.c
+++ net.c
@@ -173,7 +173,8 @@ again:
req->p = req->p->ai_next;
goto again;
} else {
- mark_nonblock_cloexec(req->fd);
+ if (!mark_nonblock_cloexec(req->fd))
+ goto err;
if (connect(req->fd, req->p->ai_addr, req->p->ai_addrlen) == 0)
goto done;
yield_w(req, try_to_connect, NULL);
Omar Polo