summaryrefslogtreecommitdiff
path: root/src/socketengines/socketengine_epoll.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/socketengines/socketengine_epoll.cpp')
-rw-r--r--src/socketengines/socketengine_epoll.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/socketengines/socketengine_epoll.cpp b/src/socketengines/socketengine_epoll.cpp
index af58cb026..b9563ed2b 100644
--- a/src/socketengines/socketengine_epoll.cpp
+++ b/src/socketengines/socketengine_epoll.cpp
@@ -54,6 +54,7 @@ public:
EPollEngine::EPollEngine() : events(1)
{
+ CurrentSetSize = 0;
int max = ulimit(4, 0);
if (max > 0)
{
@@ -193,7 +194,8 @@ int EPollEngine::DispatchEvents()
for (int j = 0; j < i; j++)
{
- struct epoll_event& ev = events[j];
+ // Copy these in case the vector gets resized and ev invalidated
+ const epoll_event ev = events[j];
EventHandler* eh = GetRef(ev.data.fd);
if (!eh)