Skip to content

Commit 946f6cc

Browse files
committed
Don't cache bad result in MythCoreContext::GetMasterHostName().
In MythCoreContext::GetMasterHostName(), don't cache the result value if SendReceiveStringList() fails.
1 parent b5c3d23 commit 946f6cc

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

mythtv/libs/libmythbase/mythcorecontext.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -615,9 +615,8 @@ QString MythCoreContext::GetMasterHostName(void)
615615
{
616616
QStringList strlist("QUERY_HOSTNAME");
617617

618-
SendReceiveStringList(strlist);
619-
620-
d->m_masterHostname = strlist[0];
618+
if (SendReceiveStringList(strlist))
619+
d->m_masterHostname = strlist[0];
621620
}
622621

623622
QString ret = d->m_masterHostname;

0 commit comments

Comments
 (0)