From 031146f4c757ca00fb9f528abf69ef4b229bdc18 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 9 Jul 2009 12:49:37 -0400 Subject: [PATCH] yet another select() refinement --- lib/stompqueuemanager.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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; + } + } } }