]> source.dussan.org Git - tigervnc.git/commitdiff
Fix bad reference in Timer::getRemainingMs()
authorPierre Ossman <ossman@cendio.se>
Thu, 20 Sep 2018 09:06:41 +0000 (11:06 +0200)
committerPierre Ossman <ossman@cendio.se>
Thu, 20 Sep 2018 09:09:34 +0000 (11:09 +0200)
The reference for "dueTime" wasn't properly updated when this code
was refactored from a static method to a normal object method.

common/rfb/Timer.cxx

index fd1a87ae98eacc6626517da5f83c661f4b4e55e1..b9dd2f6dada801b8c982372051cc2dc649fd1649 100644 (file)
@@ -151,7 +151,7 @@ int Timer::getTimeoutMs() {
 int Timer::getRemainingMs() {
   timeval now;
   gettimeofday(&now, 0);
-  return __rfbmax(0, diffTimeMillis(pending.front()->dueTime, now));
+  return __rfbmax(0, diffTimeMillis(dueTime, now));
 }
 
 bool Timer::isBefore(timeval other) {