aboutsummaryrefslogtreecommitdiffstats
path: root/src/socketengine_epoll.cpp
diff options
context:
space:
mode:
authorGravatar peavey2007-01-11 04:24:37 +0000
committerGravatar peavey2007-01-11 04:24:37 +0000
commitc662a37341e9787ca8c5e553b3d641a19e3b81c8 (patch)
tree9dede0e562bfa84059744340f66a316038f31750 /src/socketengine_epoll.cpp
parentCloser now, but somehow libpq invalidates the file descriptor on server shutd... (diff)
downloadinspircd++-c662a37341e9787ca8c5e553b3d641a19e3b81c8.tar.gz
inspircd++-c662a37341e9787ca8c5e553b3d641a19e3b81c8.tar.bz2
inspircd++-c662a37341e9787ca8c5e553b3d641a19e3b81c8.zip
pgsql should now work thx to added posibility to force a fd out of the socketengine. This should only be used as a *last resort* when dealing with 3rd party libs that invalidates a file descriptor beyond your control.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6295 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/socketengine_epoll.cpp')
-rw-r--r--src/socketengine_epoll.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/socketengine_epoll.cpp b/src/socketengine_epoll.cpp
index 49fd1339a..24ee6c891 100644
--- a/src/socketengine_epoll.cpp
+++ b/src/socketengine_epoll.cpp
@@ -91,7 +91,7 @@ void EPollEngine::WantWrite(EventHandler* eh)
}
}
-bool EPollEngine::DelFd(EventHandler* eh)
+bool EPollEngine::DelFd(EventHandler* eh, bool force)
{
int fd = eh->GetFd();
if ((fd < 0) || (fd > MAX_DESCRIPTORS))
@@ -103,7 +103,7 @@ bool EPollEngine::DelFd(EventHandler* eh)
ev.data.fd = fd;
int i = epoll_ctl(EngineHandle, EPOLL_CTL_DEL, fd, &ev);
- if (i < 0)
+ if (i < 0 && !force)
return false;
CurrentSetSize--;