mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-01 18:01:13 +02:00
cc_timer.cpp: don't loop if slot OnTimer is empty
Just for safety and to save resources.
This commit is contained in:
@@ -75,7 +75,7 @@ void CComponentsTimer::runSharedTimerAction()
|
|||||||
//start loop
|
//start loop
|
||||||
tn = "cc:"+name;
|
tn = "cc:"+name;
|
||||||
set_threadname(tn.c_str());
|
set_threadname(tn.c_str());
|
||||||
while(tm_enable && tm_interval > 0) {
|
while(tm_enable && tm_interval > 0 && !OnTimer.empty()) {
|
||||||
tm_mutex.lock();
|
tm_mutex.lock();
|
||||||
OnTimer();
|
OnTimer();
|
||||||
if (!tm_enable_nano){
|
if (!tm_enable_nano){
|
||||||
|
Reference in New Issue
Block a user