summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorevan <evan@controlezvous.ca>2008-08-30 04:35:02 -0400
committerevan <evan@controlezvous.ca>2008-08-30 04:35:02 -0400
commit55816cf24ea6e54881c54c890d3ffe751e6e65fb (patch)
tree3418bd0c14db1513d62555fc8a03910c8f9e15cb
parent19147201c8cc8c91e41569203fac5c85cdfbf350 (diff)
some fixes from on the jabber server
darcs-hash:20080830083502-5b646-d6a66157d86ca84cfa6cf6280bb2eb17bc20e02d.gz
-rw-r--r--lib/queuehandler.php4
-rwxr-xr-xscripts/xmppqueuehandler.php2
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/queuehandler.php b/lib/queuehandler.php
index a1214986a..ba7a93ab2 100644
--- a/lib/queuehandler.php
+++ b/lib/queuehandler.php
@@ -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);
diff --git a/scripts/xmppqueuehandler.php b/scripts/xmppqueuehandler.php
index 489ae7e7c..2adcdf7e4 100755
--- a/scripts/xmppqueuehandler.php
+++ b/scripts/xmppqueuehandler.php
@@ -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();