diff options
author | louiz’ <louiz@louiz.org> | 2016-10-12 20:53:41 +0200 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2016-10-12 21:00:05 +0200 |
commit | 827a1eedf8936e90fe25fa851e7a13b1730f37f6 (patch) | |
tree | 95a84a52ec2e7e6292944cf4d9676cdfa4a724a9 /louloulibs/network | |
parent | 5f2e4820df51374ddd61b68abf35f9ee75f5a117 (diff) | |
download | biboumi-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/network')
-rw-r--r-- | louloulibs/network/poller.cpp | 3 |
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--; |