summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/socketengines/socketengine_epoll.cpp2
-rw-r--r--src/socketengines/socketengine_kqueue.cpp2
-rw-r--r--src/socketengines/socketengine_ports.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/socketengines/socketengine_epoll.cpp b/src/socketengines/socketengine_epoll.cpp
index 657505d2d..0ce664937 100644
--- a/src/socketengines/socketengine_epoll.cpp
+++ b/src/socketengines/socketengine_epoll.cpp
@@ -91,7 +91,7 @@ void EPollEngine::WantWrite(EventHandler* eh)
*/
struct epoll_event ev;
memset(&ev,0,sizeof(ev));
- ev.events = EPOLLOUT;
+ ev.events = EPOLLIN | EPOLLOUT;
ev.data.fd = eh->GetFd();
epoll_ctl(EngineHandle, EPOLL_CTL_MOD, eh->GetFd(), &ev);
}
diff --git a/src/socketengines/socketengine_kqueue.cpp b/src/socketengines/socketengine_kqueue.cpp
index 7630ffb98..c7d8d74b9 100644
--- a/src/socketengines/socketengine_kqueue.cpp
+++ b/src/socketengines/socketengine_kqueue.cpp
@@ -116,7 +116,7 @@ void KQueueEngine::WantWrite(EventHandler* eh)
* the original setting rather than adding it twice. See man kqueue.
*/
struct kevent ke;
- EV_SET(&ke, eh->GetFd(), EVFILT_WRITE, EV_ADD | EV_ONESHOT, 0, 0, NULL);
+ EV_SET(&ke, eh->GetFd(), EVFILT_READ | EVFILT_WRITE, EV_ADD | EV_ONESHOT, 0, 0, NULL);
kevent(EngineHandle, &ke, 1, 0, 0, NULL);
}
diff --git a/src/socketengines/socketengine_ports.cpp b/src/socketengines/socketengine_ports.cpp
index 01d9984c1..5e2347e35 100644
--- a/src/socketengines/socketengine_ports.cpp
+++ b/src/socketengines/socketengine_ports.cpp
@@ -66,7 +66,7 @@ bool PortsEngine::AddFd(EventHandler* eh)
void PortsEngine::WantWrite(EventHandler* eh)
{
- port_associate(EngineHandle, PORT_SOURCE_FD, eh->GetFd(), POLLWRNORM, eh);
+ port_associate(EngineHandle, PORT_SOURCE_FD, eh->GetFd(), POLLRDNORM | POLLWRNORM, eh);
}
bool PortsEngine::DelFd(EventHandler* eh, bool force)