From 5e6fa2a3ab69050c48a657d4a6a1f8b49fa61146 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 24 Apr 2013 13:23:15 -0400 Subject: [PATCH] event_base_update_cache_time should be a no-op if the loop isn't running --- event.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/event.c b/event.c index 9286c36f..9354713b 100644 --- a/event.c +++ b/event.c @@ -426,7 +426,8 @@ event_base_update_cache_time(struct event_base *base) } EVBASE_ACQUIRE_LOCK(base, th_base_lock); - update_time_cache(base); + if (base->running_loop) + update_time_cache(base); EVBASE_RELEASE_LOCK(base, th_base_lock); return 0; }