win32: serial socket timeouts. bugzid: 654
[deb_libcec.git] / src / lib / adapter / USBCECAdapterCommunication.cpp
index 5ca36bdda90dbb539c40ded817da6a6eff0d38aa..8269d139885028dfe3d92955162667a0c754d2b4 100644 (file)
@@ -224,7 +224,7 @@ void *CUSBCECAdapterCommunication::Process(void)
   {
     {
       CLockObject lock(m_mutex);
-      ReadFromDevice(50);
+      ReadFromDevice(5);
       bCommandReceived = m_callback && Read(command, 0) && m_bInitialised;
     }
 
@@ -240,10 +240,7 @@ void *CUSBCECAdapterCommunication::Process(void)
     }
 
     if (!IsStopped())
-    {
-      Sleep(5);
       WriteNextCommand();
-    }
   }
 
   /* notify all threads that are waiting on messages to be sent */
@@ -1029,7 +1026,6 @@ cec_datapacket CUSBCECAdapterCommunication::GetSetting(cec_adapter_messagecode m
     return retVal;
   }
 
-  Sleep(250); // TODO ReadFromDevice() isn't waiting for the timeout to pass on win32
   ReadFromDevice(CEC_DEFAULT_TRANSMIT_WAIT, iResponseLength + 3 /* start + msgcode + iResponseLength + end */);
   CCECAdapterMessage input;
   if (Read(input, 0))