]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
some fixes from on the jabber server
authorevan <evan@controlezvous.ca>
Sat, 30 Aug 2008 08:35:02 +0000 (04:35 -0400)
committerevan <evan@controlezvous.ca>
Sat, 30 Aug 2008 08:35:02 +0000 (04:35 -0400)
darcs-hash:20080830083502-5b646-d6a66157d86ca84cfa6cf6280bb2eb17bc20e02d.gz

lib/queuehandler.php
scripts/xmppqueuehandler.php

index a1214986a8fa9a5ea3672511a1ce15cf12ddb767..ba7a93ab29b909ed7c9d219734da80a8b5d3d61b 100644 (file)
@@ -87,8 +87,8 @@ class QueueHandler {
                                $start = microtime();
                                $this->idle();
                                $used = microtime() - $start;
-                               if ($used < 3000000) {
-                                       usleep(3000000 - $used);
+                               if ($used < 1000000) {
+                                       usleep(1000000 - $used);
                                }
                        }       
                } while (true);
index 489ae7e7ca6434cf27548c64436bba79f858bbdb..2adcdf7e477e25ea4dfcec6717ed018b020fb8e2 100755 (executable)
@@ -53,6 +53,7 @@ class XmppQueueHandler extends QueueHandler {
        }
 
        function idle() {
+               $this->log(LOG_DEBUG, 'Processing the incoming message queue.');
                # Process the queue for a second
                $this->conn->processTime(1);
        }
@@ -62,6 +63,7 @@ class XmppQueueHandler extends QueueHandler {
 
        function forward_message(&$pl) {
                if ($pl['type'] != 'chat') {
+                   $this->log(LOG_DEBUG, 'Ignoring message of type ' . $pl['type'] . ' from ' . $pl['from']);
                        return;
                }
                $listener = $this->listener();