diff --git a/relay/timermgr.cpp b/relay/timermgr.cpp index 2b634e928..d2f9a262f 100644 --- a/relay/timermgr.cpp +++ b/relay/timermgr.cpp @@ -29,7 +29,6 @@ TimerMgr::TimerMgr() : m_nextFireTime(0) - , m_heartbeat(RelayConfigs::GetConfigs()->GetHeartbeatInterval() ) { pthread_mutex_init( &m_timersMutex, NULL ); } @@ -74,15 +73,16 @@ TimerMgr::GetPollTimeout() time_t tout = m_nextFireTime; if ( tout == 0 ) { - tout = m_heartbeat; + tout = -1; } else { tout -= now(); if ( tout < 0 ) { tout = 0; } + tout *= 1000; } - return tout * 1000; -} + return tout; +} /* GetPollTimeout */ int TimerMgr::getTimer( TimerProc proc, void* closure ) diff --git a/relay/timermgr.h b/relay/timermgr.h index 263ddbd59..389195583 100644 --- a/relay/timermgr.h +++ b/relay/timermgr.h @@ -64,7 +64,6 @@ class TimerMgr { list m_timers; time_t m_nextFireTime; - time_t m_heartbeat; }; #endif