From: Evan Prodromou Date: Thu, 9 Jul 2009 16:49:37 +0000 (-0400) Subject: yet another select() refinement X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=031146f4c757ca00fb9f528abf69ef4b229bdc18;p=quix0rs-gnu-social.git yet another select() refinement --- diff --git a/lib/stompqueuemanager.php b/lib/stompqueuemanager.php index ac55f9733e..d13af3fa52 100644 --- a/lib/stompqueuemanager.php +++ b/lib/stompqueuemanager.php @@ -122,9 +122,12 @@ class StompQueueManager if (in_array($stompsock, $read)) { $this->_handleNotice($queue, $handler); } - $handler->idle(QUEUE_HANDLER_HIT_IDLE); - } else { // timeout - $handler->idle(QUEUE_HANDLER_MISS_IDLE); + foreach ($handsocks as $sock) { + if (in_array($sock, $read)) { + $handler->idle(QUEUE_HANDLER_HIT_IDLE); + break; + } + } } }