Ticket #6595: 6595-mainserver-qtimer.patch

File 6595-mainserver-qtimer.patch, 1.4 KB (added by Jeff Lu <jll544@…>, 11 years ago)
  • programs/mythbackend/mainserver.h

     
    5656    void deferredDeleteSlot(void);
    5757    void autoexpireUpdate(void);
    5858
     59  signals:
     60    void masterConnectionLost(void);
     61
    5962  private slots:
    6063    void newConnection(MythSocket *);
    6164
  • programs/mythbackend/mainserver.cpp

     
    204204        masterServerReconnect->setSingleShot(true);
    205205        connect(masterServerReconnect, SIGNAL(timeout()), this,
    206206                SLOT(reconnectTimeout()));
     207        connect(this, SIGNAL(masterConnectionLost(void)), this,
     208                SLOT(reconnectTimeout()));
    207209        masterServerReconnect->start(1000);
    208210    }
    209211
     
    42624264            sockListLock.unlock();
    42634265            masterServer->DownRef();
    42644266            masterServer = NULL;
    4265             masterServerReconnect->start(1000);
     4267            // Called from MythSocketThread - cannot start MainServer's timer
     4268            // masterServerReconnect->start(1000);
     4269            emit masterConnectionLost();
    42664270            return;
    42674271        }
    42684272        else if (sock == socket)