]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
[event-loop] Restart front of pending timeout list after dispatch
authorRay Strode <rstrode@redhat.com>
Wed, 18 Nov 2009 21:32:09 +0000 (16:32 -0500)
committerRay Strode <rstrode@redhat.com>
Wed, 18 Nov 2009 21:32:09 +0000 (16:32 -0500)
This is in case a timeout handler invalidates the list while being
dispatched.

src/libply/ply-event-loop.c

index 476b116f30fd27bc3b704b3ee59d761d8ccd0a8e..dacf1007ea911eed6f1efbef76199e508a6db56b 100644 (file)
@@ -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
         {