forked from GNUsocial/gnu-social
some fixes from on the jabber server
darcs-hash:20080830083502-5b646-d6a66157d86ca84cfa6cf6280bb2eb17bc20e02d.gz
This commit is contained in:
parent
19147201c8
commit
55816cf24e
@ -87,8 +87,8 @@ class QueueHandler {
|
|||||||
$start = microtime();
|
$start = microtime();
|
||||||
$this->idle();
|
$this->idle();
|
||||||
$used = microtime() - $start;
|
$used = microtime() - $start;
|
||||||
if ($used < 3000000) {
|
if ($used < 1000000) {
|
||||||
usleep(3000000 - $used);
|
usleep(1000000 - $used);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while (true);
|
} while (true);
|
||||||
|
@ -53,6 +53,7 @@ class XmppQueueHandler extends QueueHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function idle() {
|
function idle() {
|
||||||
|
$this->log(LOG_DEBUG, 'Processing the incoming message queue.');
|
||||||
# Process the queue for a second
|
# Process the queue for a second
|
||||||
$this->conn->processTime(1);
|
$this->conn->processTime(1);
|
||||||
}
|
}
|
||||||
@ -62,6 +63,7 @@ class XmppQueueHandler extends QueueHandler {
|
|||||||
|
|
||||||
function forward_message(&$pl) {
|
function forward_message(&$pl) {
|
||||||
if ($pl['type'] != 'chat') {
|
if ($pl['type'] != 'chat') {
|
||||||
|
$this->log(LOG_DEBUG, 'Ignoring message of type ' . $pl['type'] . ' from ' . $pl['from']);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$listener = $this->listener();
|
$listener = $this->listener();
|
||||||
|
Loading…
Reference in New Issue
Block a user