From: Ray Strode Date: Wed, 18 Nov 2009 21:32:09 +0000 (-0500) Subject: [event-loop] Restart front of pending timeout list after dispatch X-Git-Tag: 0.8.0~133 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63c94dfc6da0dc026266ad41d67fc0c78cf1667a;p=thirdparty%2Fplymouth.git [event-loop] Restart front of pending timeout list after dispatch This is in case a timeout handler invalidates the list while being dispatched. --- diff --git a/src/libply/ply-event-loop.c b/src/libply/ply-event-loop.c index 476b116f..dacf1007 100644 --- a/src/libply/ply-event-loop.c +++ b/src/libply/ply-event-loop.c @@ -1201,6 +1201,10 @@ ply_event_loop_handle_timeouts (ply_event_loop_t *loop) watch->handler (watch->user_data, loop); free (watch); + + /* start over in case the handler invalidated the list + */ + next_node = ply_list_get_first_node (loop->timeout_watches); } else {