From c3dcff09369086b862870953f3f3ce5b5b10403f Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Thu, 20 Sep 2018 11:06:41 +0200 Subject: [PATCH] Fix bad reference in Timer::getRemainingMs() 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/rfb/Timer.cxx b/common/rfb/Timer.cxx index fd1a87ae..b9dd2f6d 100644 --- a/common/rfb/Timer.cxx +++ b/common/rfb/Timer.cxx @@ -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) { -- 2.39.5