From 0f688c99ae9178f1ca4ff142064139bd007d316d Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Thu, 23 Feb 2012 01:40:20 -0800 Subject: [PATCH] OSC: Process all available events in one wait cycle. --- nonlib/OSC/Endpoint.C | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nonlib/OSC/Endpoint.C b/nonlib/OSC/Endpoint.C index 91d23b3..adf4cf3 100644 --- a/nonlib/OSC/Endpoint.C +++ b/nonlib/OSC/Endpoint.C @@ -339,11 +339,12 @@ namespace OSC wait( 0 ); } -/** Process any waiting events and return immediately */ +/** Process any waiting events and return after timeout */ void Endpoint::wait ( int timeout ) const - { - lo_server_recv_noblock( _server, timeout ); + { + if ( lo_server_wait( _server, timeout ) ) + while ( lo_server_recv_noblock( _server, 0 ) ) { } } /** Process events forever */