Avoid 100% CPU in case of repeated error in select().

git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@242 119443c7-1b9e-41f8-b6fc-b9c35fce742c
This commit is contained in:
Marcelo Roberto Jimenez 2007-11-09 11:48:30 +00:00
parent 1f05f5d6cc
commit 27af41e562

View File

@ -416,6 +416,8 @@ RunMiniServer( MiniServerSockArray * miniSock )
UPNP_SOCKETERROR ) {
UpnpPrintf( UPNP_CRITICAL, SSDP, __FILE__, __LINE__,
"Error in select call!\n" );
/* Avoid 100% CPU in case of repeated error in select() */
isleep( 1 );
continue;
} else {
if( FD_ISSET( miniServSock, &rdSet ) ) {