From 031146f4c757ca00fb9f528abf69ef4b229bdc18 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 9 Jul 2009 12:49:37 -0400 Subject: yet another select() refinement --- lib/stompqueuemanager.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lib/stompqueuemanager.php') diff --git a/lib/stompqueuemanager.php b/lib/stompqueuemanager.php index ac55f9733..d13af3fa5 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; + } + } } } -- cgit v1.2.3-54-g00ecf