From 827a1eedf8936e90fe25fa851e7a13b1730f37f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Wed, 12 Oct 2016 20:53:41 +0200 Subject: On EINPROGRESS, we need to also check for read events (because openBSD lies) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit “It is possible to select(2) or poll(2) for completion by selecting the socket for writing” Yeah, sure, “writing”… --- louloulibs/network/poller.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/louloulibs/network/poller.cpp b/louloulibs/network/poller.cpp index 9868236..9f5bcfb 100644 --- a/louloulibs/network/poller.cpp +++ b/louloulibs/network/poller.cpp @@ -186,7 +186,8 @@ int Poller::poll(const std::chrono::milliseconds& timeout) socket_handler->on_send(); nb_events--; } - else if (this->fds[i].revents & POLLOUT) + else if (this->fds[i].revents & POLLOUT || + this->fds[i].revents & POLLIN) { socket_handler->connect(); nb_events--; -- cgit v1.2.3