From 1f8c12807a3b31b6e1c3fe2c5e2394acdf9ebb5a Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 30 Dec 2006 17:14:52 +0000 Subject: Change delays to 1 sec. NOTE: The chances of this actually waiting for 1 sec on any sizeable network are miniscule git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6176 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/socketengine_epoll.cpp | 2 +- src/socketengine_kqueue.cpp | 4 ++-- src/socketengine_select.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/socketengine_epoll.cpp b/src/socketengine_epoll.cpp index c36e964f8..49fd1339a 100644 --- a/src/socketengine_epoll.cpp +++ b/src/socketengine_epoll.cpp @@ -126,7 +126,7 @@ int EPollEngine::DispatchEvents() { socklen_t codesize; int errcode; - int i = epoll_wait(EngineHandle, events, MAX_DESCRIPTORS, 150); + int i = epoll_wait(EngineHandle, events, MAX_DESCRIPTORS, 1000); for (int j = 0; j < i; j++) { if (events[j].events & EPOLLHUP) diff --git a/src/socketengine_kqueue.cpp b/src/socketengine_kqueue.cpp index ebc1fffbd..b56ca264c 100644 --- a/src/socketengine_kqueue.cpp +++ b/src/socketengine_kqueue.cpp @@ -132,8 +132,8 @@ int KQueueEngine::GetRemainingFds() int KQueueEngine::DispatchEvents() { - ts.tv_nsec = 5000L; - ts.tv_sec = 0; + ts.tv_nsec = 0; + ts.tv_sec = 1; int i = kevent(EngineHandle, NULL, 0, &ke_list[0], MAX_DESCRIPTORS, &ts); for (int j = 0; j < i; j++) { diff --git a/src/socketengine_select.cpp b/src/socketengine_select.cpp index 5be97eff6..2be16b282 100644 --- a/src/socketengine_select.cpp +++ b/src/socketengine_select.cpp @@ -110,8 +110,8 @@ int SelectEngine::DispatchEvents() FD_SET (a->second, &errfdset); } - tval.tv_sec = 0; - tval.tv_usec = 50L; + tval.tv_sec = 1; + tval.tv_usec = 0; sresult = select(FD_SETSIZE, &rfdset, &wfdset, &errfdset, &tval); if (sresult > 0) { -- cgit v1.2.3