From 547d54a6debc390391d5fc4269d43f2d1f3443cc Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 31 Jan 2005 09:53:21 +0000 Subject: r5129: make sure we don't spin chewing CPU time due to my last change (This used to be commit 69e97ad9c397261cd6edb6f7504021942f16c0ec) --- source4/lib/events.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source4/lib/events.c b/source4/lib/events.c index 3263be08f1..166cbe4509 100644 --- a/source4/lib/events.c +++ b/source4/lib/events.c @@ -290,7 +290,11 @@ int event_loop_once(struct event_context *ev) * sys_select() with something in the events * structure - for now just use select() */ - selrtn = select(ev->maxfd+1, &r_fds, &w_fds, NULL, &tval); + if (timeval_is_zero(&tval)) { + selrtn = select(ev->maxfd+1, &r_fds, &w_fds, NULL, NULL); + } else { + selrtn = select(ev->maxfd+1, &r_fds, &w_fds, NULL, &tval); + } t = timeval_current(); -- cgit