Permalink
Browse files

Check both sockets in GetMasterHostPrefix()

Since we no longer clear both sockets in the disconnect handler we
need to check both the server socket and the event socket for
disconnect.
  • Loading branch information...
daniel-kristjansson committed Nov 20, 2012
1 parent 987c420 commit 4bb97ceecc53080533de903c05b06f3920fd6a3d
Showing with 2 additions and 1 deletion.
  1. +2 −1 mythtv/libs/libmythbase/mythcorecontext.cpp
@@ -704,7 +704,8 @@ QString MythCoreContext::GetMasterHostPrefix(const QString &storageGroup,
}
QMutexLocker locker(&d->m_sockLock);
if (!d->m_serverSock)
if (!d->m_serverSock || !d->m_serverSock->IsConnected() ||
!d->m_eventSock || !d->m_eventSock->IsConnected())
{
bool blockingClient = GetNumSetting("idleTimeoutSecs",0) > 0;
ConnectToMasterServer(blockingClient);

0 comments on commit 4bb97ce

Please sign in to comment.