X-Git-Url: https://git.piment-noir.org/?p=deb_libcec.git;a=blobdiff_plain;f=src%2Flib%2Fadapter%2FPulse-Eight%2FUSBCECAdapterCommunication.cpp;fp=src%2Flib%2Fadapter%2FPulse-Eight%2FUSBCECAdapterCommunication.cpp;h=1be07c51fbb385e224a7fa5ec1ff0c2cb40515f9;hp=037359599be766fce14a87779e3405318393927f;hb=b45bdacdeee5c96e0294717fbe2c47a49a110fd1;hpb=81e38211724bc6e8bd7a60f484433053ed682635 diff --git a/src/lib/adapter/Pulse-Eight/USBCECAdapterCommunication.cpp b/src/lib/adapter/Pulse-Eight/USBCECAdapterCommunication.cpp index 0373595..1be07c5 100644 --- a/src/lib/adapter/Pulse-Eight/USBCECAdapterCommunication.cpp +++ b/src/lib/adapter/Pulse-Eight/USBCECAdapterCommunication.cpp @@ -710,7 +710,7 @@ void *CAdapterPingThread::Process(void) /* send a ping to the adapter */ bool bPinged(false); int iFailedCounter(0); - while (!bPinged && iFailedCounter < 3) + while (!bPinged && iFailedCounter < 3 && !IsStopped()) { if (!m_com->PingAdapter()) { @@ -724,7 +724,7 @@ void *CAdapterPingThread::Process(void) } } - if (iFailedCounter == 3) + if (iFailedCounter == 3 && !IsStopped()) { /* failed to ping the adapter 3 times in a row. something must be wrong with the connection */ m_com->LIB_CEC->AddLog(CEC_LOG_ERROR, "failed to ping the adapter 3 times in a row. closing the connection.");