From 9f2b3c822f0dbe07d1a6469518bea634ad999696 Mon Sep 17 00:00:00 2001 From: Marko Kreen Date: Wed, 28 Jun 2017 17:58:51 +0300 Subject: [PATCH] sbuf: check for EAGAIN in connect seems it can be returned in win32 fixes: #188 #161 --- src/sbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sbuf.c b/src/sbuf.c index 8d9cc0a..ed000e6 100644 --- a/src/sbuf.c +++ b/src/sbuf.c @@ -175,7 +175,7 @@ bool sbuf_connect(SBuf *sbuf, const struct sockaddr *sa, int sa_len, int timeout /* unix socket gives connection immediately */ sbuf_connect_cb(sock, EV_WRITE, sbuf); return true; - } else if (errno == EINPROGRESS) { + } else if (errno == EINPROGRESS || errno == EAGAIN) { /* tcp socket needs waiting */ event_set(&sbuf->ev, sock, EV_WRITE, sbuf_connect_cb, sbuf); res = event_add(&sbuf->ev, &timeout); -- 2.40.0