diff --git a/mythtv/programs/mythbackend/scheduler.cpp b/mythtv/programs/mythbackend/scheduler.cpp
index b01e57cfae..5a76218b76 100644
a
|
b
|
void Scheduler::HandleIdleShutdown( |
3056 | 3056 | // the frontend may have connected then gone idle between scheduler runs |
3057 | 3057 | if (blockShutdown) |
3058 | 3058 | { |
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) |
3060 | 3065 | { |
3061 | 3066 | LOG(VB_GENERAL, LOG_NOTICE, "Client is connected, removing startup block on shutdown"); |
3062 | 3067 | blockShutdown = false; |
… |
… |
void Scheduler::HandleIdleShutdown( |
3071 | 3076 | |
3072 | 3077 | // find out, if we are currently recording (or LiveTV) |
3073 | 3078 | bool recording = false; |
| 3079 | m_schedLock.unlock(); |
3074 | 3080 | TVRec::s_inputsLock.lockForRead(); |
3075 | 3081 | QMap<int, EncoderLink *>::Iterator it; |
3076 | 3082 | for (it = m_tvList->begin(); (it != m_tvList->end()) && |
… |
… |
void Scheduler::HandleIdleShutdown( |
3083 | 3089 | |
3084 | 3090 | // If there are BLOCKING clients, then we're not idle |
3085 | 3091 | bool blocking = m_mainServer->isClientConnected(true); |
| 3092 | m_schedLock.lock(); |
| 3093 | if (m_recListChanged) |
| 3094 | return; |
3086 | 3095 | |
3087 | 3096 | // If there are active jobs, then we're not idle |
3088 | 3097 | bool activeJobs = JobQueue::HasRunningOrPendingJobs(0); |