summaryrefslogtreecommitdiff
path: root/louloulibs
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2016-10-12 20:53:41 +0200
committerlouiz’ <louiz@louiz.org>2016-10-12 21:00:05 +0200
commit827a1eedf8936e90fe25fa851e7a13b1730f37f6 (patch)
tree95a84a52ec2e7e6292944cf4d9676cdfa4a724a9 /louloulibs
parent5f2e4820df51374ddd61b68abf35f9ee75f5a117 (diff)
downloadbiboumi-827a1eedf8936e90fe25fa851e7a13b1730f37f6.tar.gz
biboumi-827a1eedf8936e90fe25fa851e7a13b1730f37f6.tar.bz2
biboumi-827a1eedf8936e90fe25fa851e7a13b1730f37f6.tar.xz
biboumi-827a1eedf8936e90fe25fa851e7a13b1730f37f6.zip
On EINPROGRESS, we need to also check for read events (because openBSD lies)
“It is possible to select(2) or poll(2) for completion by selecting the socket for writing” Yeah, sure, “writing”…
Diffstat (limited to 'louloulibs')
-rw-r--r--louloulibs/network/poller.cpp3
1 files changed, 2 insertions, 1 deletions
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--;