diff options
Diffstat (limited to 'src/components/connection_handler/src/heartbeat_monitor.cc')
-rw-r--r-- | src/components/connection_handler/src/heartbeat_monitor.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/components/connection_handler/src/heartbeat_monitor.cc b/src/components/connection_handler/src/heartbeat_monitor.cc index 6a5a9e723e..1bd5fb3b58 100644 --- a/src/components/connection_handler/src/heartbeat_monitor.cc +++ b/src/components/connection_handler/src/heartbeat_monitor.cc @@ -83,12 +83,11 @@ void HeartBeatMonitor::Process() { } void HeartBeatMonitor::RefreshExpiration(TimevalStruct* expiration) const { - LOG4CXX_TRACE_ENTER(logger_); + LOG4CXX_AUTO_TRACE(logger_); sync_primitives::AutoLock locker(heartbeat_timeout_seconds_lock_); DCHECK(expiration); *expiration = date_time::DateTime::getCurrentTime(); expiration->tv_sec += heartbeat_timeout_seconds_; - LOG4CXX_TRACE_EXIT(logger_); } void HeartBeatMonitor::threadMain() { @@ -144,12 +143,12 @@ void HeartBeatMonitor::KeepAlive(uint8_t session_id) { } } -bool HeartBeatMonitor::exitThreadMain() { - LOG4CXX_TRACE_ENTER(logger_); +void HeartBeatMonitor::exitThreadMain() { + // FIXME (dchmerev@luxoft.com): thread requested to stop should stop as soon as possible, + // not running one more iteration before actual stop + LOG4CXX_AUTO_TRACE(logger_); run_ = false; AutoLock main_lock(main_thread_lock_); - LOG4CXX_TRACE_EXIT(logger_); - return true; } void HeartBeatMonitor::set_heartbeat_timeout_seconds(int32_t timeout) { |