From: g0dil Date: Tue, 3 Nov 2009 09:34:17 +0000 (+0000) Subject: Scheduler: Fix timeout/watchdog interference bug X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=0f4295ebd0f45ccbaa0c3d9a4d480245bf08c3c1;p=senf.git Scheduler: Fix timeout/watchdog interference bug git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1513 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/senf/PPI/SocketSink.hh b/senf/PPI/SocketSink.hh index a599816..a42a0b9 100644 --- a/senf/PPI/SocketSink.hh +++ b/senf/PPI/SocketSink.hh @@ -241,10 +241,10 @@ namespace module { able to handle complete datagrams. This output module will write data to a FileHandle object using a given \a Writer. This - output module is passive. This implies, that the output handle may not block. This also - implies, that data will probably get lost if written to fast for the underlying transport - mechanism. Either this is desired (like for a UDP socket) or some additional bandwidth - shaping needs to be used. + output module is passive. This implies, that the output handle may not block. This + also implies, that data will probably get lost if written to fast for the underlying + transport mechanism. Either this is desired (like for a UDP socket) or some additional + bandwidth shaping needs to be used. The default \a Writer is senf::ppi::ConnectedDgramWriter which will write out the complete packet to the file handle. diff --git a/senf/Scheduler/Poller.ct b/senf/Scheduler/Poller.ct index 0cd1f07..bbe5c31 100644 --- a/senf/Scheduler/Poller.ct +++ b/senf/Scheduler/Poller.ct @@ -65,14 +65,12 @@ prefix_ typename senf::scheduler::detail::Poller::range senf::scheduler:: { static epoll_event events[NumEvents]; int rv (0); - for (;;) { - rv = epoll_wait(epollFd_, events, NumEvents, timeout_); - if (rv == -1) { - if (errno == EINTR) - continue; + rv = epoll_wait(epollFd_, events, NumEvents, timeout_); + if (rv == -1) { + if (errno == EINTR) + rv = 0; + else SENF_THROW_SYSTEM_EXCEPTION("epoll_wait()"); - } - break; } return boost::make_iterator_range( boost::make_transform_iterator(events, GetPollResult()),