[event-loop] Restart front of pending timeout list after dispatch

This is in case a timeout handler invalidates the list while being
dispatched.
This commit is contained in:
Ray Strode 2009-11-18 16:32:09 -05:00
parent 030a3a27a7
commit 63c94dfc6d

View 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
{