X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fadapter%2FPulse-Eight%2FUSBCECAdapterCommunication.cpp;h=1be07c51fbb385e224a7fa5ec1ff0c2cb40515f9;hb=9be2206f155d4cff55d816e80d6275844cc33b3b;hp=037359599be766fce14a87779e3405318393927f;hpb=f7773e4047c9030aa02418ab33319ab14ebdacca;p=deb_libcec.git 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.");