diff options
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r-- | src/inspircd.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 52f7b6479..ec47b9e16 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -36,7 +36,7 @@ using namespace std; #ifdef USE_EPOLL #include <sys/epoll.h> -#define EP_DELAY 10 +#define EP_DELAY 100 #endif #include <time.h> @@ -2795,7 +2795,10 @@ int InspIRCd(char** argv, int argc) user_hash::iterator count2 = clientlist.begin(); #ifdef USE_EPOLL - i = epoll_wait(sep, event, 1, EP_DELAY); + i = epoll_wait(sep, event, 1, EP_DELAY*2); +#ifdef _POSIX_PRIORITY_SCHEDULING + sched_yield(); +#endif if (i > 0) { log(DEBUG,"epoll: Listening server socket event, i=%d, event.data.fd=%d",i,event[0].data.fd); @@ -3049,7 +3052,7 @@ int InspIRCd(char** argv, int argc) v = 0; #ifdef USE_EPOLL - int i = epoll_wait(ep, event, 1, EP_DELAY); + int i = epoll_wait(ep, event, 1, 5); if (i > 0) { log(DEBUG,"epoll_wait call: ep=%d, i=%d",ep,i); @@ -3296,7 +3299,13 @@ int InspIRCd(char** argv, int argc) { #endif #ifdef USE_EPOLL - i = epoll_wait(lep, event, 32, EP_DELAY); +#ifdef _POSIX_PRIORITY_SCHEDULING + sched_yield(); +#endif + i = epoll_wait(lep, event, 32, EP_DELAY*2); +#ifdef _POSIX_PRIORITY_SCHEDULING + sched_yield(); +#endif if (i > 0) for (j = 0; j < i; j++) { log(DEBUG,"epoll: Listening socket event, i=%d,events[j].data.fd=%d",i,event[j].data.fd); |