Browse Source

Handle timers which should be executed right away

tags/v1.8.90
Pierre Ossman 7 years ago
parent
commit
e0a3ad423d
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      common/rfb/Timer.cxx

+ 3
- 0
common/rfb/Timer.cxx View File

@@ -129,6 +129,9 @@ void Timer::start(int timeoutMs_) {
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);
}

Loading…
Cancel
Save