Use net_Accept's timeout param instead of a call to msleep.
authorAntoine Cellerier <dionoea@videolan.org>
Sun, 11 Feb 2007 12:11:51 +0000 (12:11 +0000)
committerAntoine Cellerier <dionoea@videolan.org>
Sun, 11 Feb 2007 12:11:51 +0000 (12:11 +0000)
modules/control/rc.c

index c43b05c..70e3cd8 100644 (file)
@@ -501,12 +501,9 @@ static void Run( intf_thread_t *p_intf )
             p_intf->p_sys->i_socket == -1 )
         {
             p_intf->p_sys->i_socket =
-                net_Accept( p_intf, p_intf->p_sys->pi_socket_listen, 0 );
-            if( p_intf->p_sys->i_socket == -1 )
-            {
-                msleep( INTF_IDLE_SLEEP );
-                continue;
-            }
+                net_Accept( p_intf, p_intf->p_sys->pi_socket_listen,
+                            INTF_IDLE_SLEEP );
+            if( p_intf->p_sys->i_socket == -1 ) continue;
         }
 
         b_complete = ReadCommand( p_intf, p_buffer, &i_size );