Ticket #9123: 9123_no_event_socket_on_backends.diff

File 9123_no_event_socket_on_backends.diff, 973 bytes (added by cpinkham, 9 years ago)

Don't open an event socket if a backend connects to the master via MythCoreContext?

  • mythcorecontext.cpp

     
    269269    if (!d->m_serverSock)
    270270        return false;
    271271
    272     if (!d->m_eventSock)
     272    if (!IsBackend() && !d->m_eventSock)
    273273        d->m_eventSock = ConnectEventSocket(server, port);
    274274
    275     if (!d->m_eventSock)
     275    if (!IsBackend() && !d->m_eventSock)
    276276    {
    277277        d->m_serverSock->DownRef();
    278278        d->m_serverSock = NULL;
     
    793793            d->m_serverSock->DownRef();
    794794            d->m_serverSock = NULL;
    795795
    796             d->m_eventSock->DownRef();
    797             d->m_eventSock = NULL;
     796            if (d->m_eventSock)
     797            {
     798                d->m_eventSock->DownRef();
     799                d->m_eventSock = NULL;
     800            }
    798801
    799802            bool blockingClient = GetNumSetting("idleTimeoutSecs",0);
    800803            ConnectToMasterServer(blockingClient);