Ticket #13479: 20200204_1528_deadlock_v30.patch

File 20200204_1528_deadlock_v30.patch, 1.5 KB (added by Peter Bennett, 4 years ago)

Updated V30 patch

  • mythtv/programs/mythbackend/scheduler.cpp

    diff --git a/mythtv/programs/mythbackend/scheduler.cpp b/mythtv/programs/mythbackend/scheduler.cpp
    index a0a316ac26..838d8e8b75 100644
    a b void Scheduler::HandleIdleShutdown( 
    31133113    // the frontend may have connected then gone idle between scheduler runs
    31143114    if (blockShutdown)
    31153115    {
    3116         if (m_mainServer->isClientConnected())
     3116        schedLock.unlock();
     3117        bool b = m_mainServer->isClientConnected();
     3118        schedLock.lock();
     3119        if (reclist_changed)
     3120            return;
     3121        if (b)
    31173122        {
    31183123            LOG(VB_GENERAL, LOG_NOTICE, "Client is connected, removing startup block on shutdown");
    31193124            blockShutdown = false;
    void Scheduler::HandleIdleShutdown( 
    31283133
    31293134        // find out, if we are currently recording (or LiveTV)
    31303135        bool recording = false;
     3136        schedLock.unlock();
    31313137        TVRec::inputsLock.lockForRead();
    31323138        QMap<int, EncoderLink *>::Iterator it;
    31333139        for (it = m_tvList->begin(); (it != m_tvList->end()) &&
    void Scheduler::HandleIdleShutdown( 
    31403146
    31413147        // If there are BLOCKING clients, then we're not idle
    31423148        bool blocking = m_mainServer->isClientConnected(true);
     3149        schedLock.lock();
     3150        if (reclist_changed)
     3151            return;
    31433152        if (!blocking && !recording && !delay)
    31443153        {
    31453154            // have we received a RESET_IDLETIME message?