commit | e0a3ad423db070bee076216d9d94587b40fdc680 | [log] [tgz] |
---|---|---|
author | Pierre Ossman <ossman@cendio.se> | Wed Nov 30 07:59:30 2016 +0100 |
committer | Pierre Ossman <ossman@cendio.se> | Fri Nov 17 08:22:11 2017 +0100 |
tree | d5eb198b43af5626a69c40dceed118ac7bf4be02 | |
parent | efd93fd97bedd5fba60780f016117383e85d8b59 [diff] [blame] |
Handle timers which should be executed right away
diff --git a/common/rfb/Timer.cxx b/common/rfb/Timer.cxx index efae36e..e2aefac 100644 --- a/common/rfb/Timer.cxx +++ b/common/rfb/Timer.cxx
@@ -129,6 +129,9 @@ gettimeofday(&now, 0); stop(); timeoutMs = timeoutMs_; + // The rest of the code assumes non-zero timeout + if (timeoutMs <= 0) + timeoutMs = 1; dueTime = addMillis(now, timeoutMs); insertTimer(this); }