Ticket #13479: 20200204_1521_deadlock_v31.patch

File 20200204_1521_deadlock_v31.patch, 1.5 KB (added by Peter Bennett, 12 months ago)

Updated V31 (master) patch

  • mythtv/programs/mythbackend/scheduler.cpp

    diff --git a/mythtv/programs/mythbackend/scheduler.cpp b/mythtv/programs/mythbackend/scheduler.cpp
    index b01e57cfae..5a76218b76 100644
    a b void Scheduler::HandleIdleShutdown( 
    30563056    // the frontend may have connected then gone idle between scheduler runs
    30573057    if (blockShutdown)
    30583058    {
    3059         if (m_mainServer->isClientConnected())
     3059        m_schedLock.unlock();
     3060        bool b = m_mainServer->isClientConnected();
     3061        m_schedLock.lock();
     3062        if (m_recListChanged)
     3063            return;
     3064        if (b)
    30603065        {
    30613066            LOG(VB_GENERAL, LOG_NOTICE, "Client is connected, removing startup block on shutdown");
    30623067            blockShutdown = false;
    void Scheduler::HandleIdleShutdown( 
    30713076
    30723077        // find out, if we are currently recording (or LiveTV)
    30733078        bool recording = false;
     3079        m_schedLock.unlock();
    30743080        TVRec::s_inputsLock.lockForRead();
    30753081        QMap<int, EncoderLink *>::Iterator it;
    30763082        for (it = m_tvList->begin(); (it != m_tvList->end()) &&
    void Scheduler::HandleIdleShutdown( 
    30833089
    30843090        // If there are BLOCKING clients, then we're not idle
    30853091        bool blocking = m_mainServer->isClientConnected(true);
     3092        m_schedLock.lock();
     3093        if (m_recListChanged)
     3094            return;
    30863095
    30873096        // If there are active jobs, then we're not idle
    30883097        bool activeJobs = JobQueue::HasRunningOrPendingJobs(0);