]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
yet another select() refinement
authorEvan Prodromou <evan@controlyourself.ca>
Thu, 9 Jul 2009 16:49:37 +0000 (12:49 -0400)
committerEvan Prodromou <evan@controlyourself.ca>
Thu, 9 Jul 2009 16:49:37 +0000 (12:49 -0400)
lib/stompqueuemanager.php

index ac55f9733ea8877ec4e556b57de4c7798ff47c5d..d13af3fa5266702e1446cca926b3c93a27dd3b26 100644 (file)
@@ -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;
+                    }
+                }
             }
         }