On Wed, 28 Feb 2007 22:19:09 +0200 Timo Sirainen tss@iki.fi wrote:
Fixed, sort of:
http://dovecot.org/list/dovecot-cvs/2007-February/007906.html
Way too much trouble to try to handle it correctly.
What about logging a warning and iterating through ioloop->timeouts and subtracting (ioloop_time - ioloop_timeval.tv_sec) from each next_run.tv_sec? That way, the absolute worst case would be a doubled timeout (e.g. a poll starts with 2 timeouts, one with 9 seconds remaining, and one with 10 seconds remaining, the time time goes backwards, the poll times out, and each timer has 9 seconds added to it.)
Given how infrequently the clock is likely to go backwards, the impact would probably be unnoticable, and a doubled timeout seems a lot more graceful than dying... however, there might be other things that could break that I don't know about...
Just an idea,
Ben Winslow rain@bluecherry.net