Skip to content

Commit

Permalink
Fixed heartbeat. Tested
Browse files Browse the repository at this point in the history
  • Loading branch information
Beirdo committed Apr 26, 2012
1 parent cb4f433 commit 0dfdee4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mythtv/libs/libmythbase/logging.cpp
Expand Up @@ -312,6 +312,8 @@ void LoggerThread::run(void)

while (!m_aborted || !logQueue.isEmpty())
{
qApp->processEvents();

if (logQueue.isEmpty())
{
m_waitEmpty->wakeAll();
Expand Down
4 changes: 4 additions & 0 deletions mythtv/libs/libmythbase/loggingserver.cpp
Expand Up @@ -147,6 +147,7 @@ FileLogger::~FileLogger()
m_zmqSock->setLinger(0);
m_zmqSock->disconnect(this);
m_zmqSock->close();
delete m_zmqSock;
}

/// \brief Reopen the logfile after a SIGHUP. Log files only (no console).
Expand Down Expand Up @@ -250,6 +251,7 @@ SyslogLogger::~SyslogLogger()
m_zmqSock->setLinger(0);
m_zmqSock->disconnect(this);
m_zmqSock->close();
delete m_zmqSock;
}


Expand Down Expand Up @@ -326,6 +328,7 @@ DatabaseLogger::~DatabaseLogger()
m_zmqSock->setLinger(0);
m_zmqSock->disconnect(this);
m_zmqSock->close();
delete m_zmqSock;
}

/// \brief Stop logging to the database and wait for the thread to stop.
Expand Down Expand Up @@ -730,6 +733,7 @@ void LogServerThread::checkHeartBeats(void)
while (!toDel.isEmpty())
{
QString clientId = toDel.takeFirst();
LOG(VB_GENERAL, LOG_INFO, QString("Expiring client %1").arg(clientId));
LoggerListItem *item = logClientMap.take(clientId);
LoggerList *list = item->list;
delete item;
Expand Down

0 comments on commit 0dfdee4

Please sign in to comment.