]> granicus.if.org Git - libevent/commitdiff
Clear the timer cache when leaving the event loop; reported by Robin Haberkorn
authorNiels Provos <provos@gmail.com>
Thu, 27 Nov 2008 19:27:33 +0000 (19:27 +0000)
committerNiels Provos <provos@gmail.com>
Thu, 27 Nov 2008 19:27:33 +0000 (19:27 +0000)
svn:r950

ChangeLog
event.c

index e7e4634ea600f667451a9d1cfa6f80c320e93c5f..599b069291a395ac41c7804f56da3502c66081a3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -128,6 +128,7 @@ Changes in current version:
  o Clear the timer cache on entering the event loop; reported by Victor Chang
  o Only bind the socket on connect when a local address has been provided; reported by Alejo Sanchez
  o Allow setting of local port for evhttp connections to support millions of connections from a single system; from Richard Jones.
+ o Clear the timer cache when leaving the event loop; reported by Robin Haberkorn
        
 Changes in 1.4.0:
  o allow \r or \n individually to separate HTTP headers instead of the standard "\r\n"; from Charles Kerr.
diff --git a/event.c b/event.c
index 1ee3df5d0061a85c2a7ee1e833660a7272a5ca19..ea5e43b2cab607b5fdcef146c8726f8116b6de7f 100644 (file)
--- a/event.c
+++ b/event.c
@@ -766,6 +766,9 @@ event_base_loop(struct event_base *base, int flags)
                        done = 1;
        }
 
+       /* clear time cache */
+       base->tv_cache.tv_sec = 0;
+
        event_debug(("%s: asked to terminate loop.", __func__));
        return (0);
 }