From d55f263f0fceeae13d0e046da20262307694c203 Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Mon, 27 Feb 2012 20:57:41 +0100 Subject: [PATCH] cec: ensure that the connection is really closed before retrying to connect. bugzig: 436 --- src/lib/CECProcessor.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index a4bbcbc..5b6fb03 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -188,6 +188,7 @@ bool CCECProcessor::OpenConnection(const char *strPort, uint16_t iBaudRate, uint while (timeout.TimeLeft() > 0 && (bReturn = m_communication->Open(this, (timeout.TimeLeft() / CEC_CONNECT_TRIES))) == false) { CLibCEC::AddLog(CEC_LOG_ERROR, "could not open a connection (try %d)", ++iConnectTry); + m_communication->Close(); Sleep(500); } -- 2.34.1