diff --git a/mythtv/programs/mythbackend/scheduler.cpp b/mythtv/programs/mythbackend/scheduler.cpp
index a0a316ac26..838d8e8b75 100644
a
|
b
|
void Scheduler::HandleIdleShutdown( |
3113 | 3113 | // the frontend may have connected then gone idle between scheduler runs |
3114 | 3114 | if (blockShutdown) |
3115 | 3115 | { |
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) |
3117 | 3122 | { |
3118 | 3123 | LOG(VB_GENERAL, LOG_NOTICE, "Client is connected, removing startup block on shutdown"); |
3119 | 3124 | blockShutdown = false; |
… |
… |
void Scheduler::HandleIdleShutdown( |
3128 | 3133 | |
3129 | 3134 | // find out, if we are currently recording (or LiveTV) |
3130 | 3135 | bool recording = false; |
| 3136 | schedLock.unlock(); |
3131 | 3137 | TVRec::inputsLock.lockForRead(); |
3132 | 3138 | QMap<int, EncoderLink *>::Iterator it; |
3133 | 3139 | for (it = m_tvList->begin(); (it != m_tvList->end()) && |
… |
… |
void Scheduler::HandleIdleShutdown( |
3140 | 3146 | |
3141 | 3147 | // If there are BLOCKING clients, then we're not idle |
3142 | 3148 | bool blocking = m_mainServer->isClientConnected(true); |
| 3149 | schedLock.lock(); |
| 3150 | if (reclist_changed) |
| 3151 | return; |
3143 | 3152 | if (!blocking && !recording && !delay) |
3144 | 3153 | { |
3145 | 3154 | // have we received a RESET_IDLETIME message? |