Abort the xmpp-related daemons immediately if xmpp is disabled in the config, otherwise they chew up *lots* of CPU doing nothing
This commit is contained in:
parent
ed05569716
commit
bac3ee95c9
|
@ -54,6 +54,13 @@ class JabberQueueHandler extends XmppQueueHandler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Abort immediately if xmpp is not enabled, otherwise the daemon chews up
|
||||||
|
// lots of CPU trying to connect to unconfigured servers
|
||||||
|
if (common_config('xmpp','enabled')==false) {
|
||||||
|
print "Aborting daemon - xmpp is disabled\n";
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
ini_set("max_execution_time", "0");
|
ini_set("max_execution_time", "0");
|
||||||
ini_set("max_input_time", "0");
|
ini_set("max_input_time", "0");
|
||||||
set_time_limit(0);
|
set_time_limit(0);
|
||||||
|
|
|
@ -52,6 +52,13 @@ class PublicQueueHandler extends XmppQueueHandler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Abort immediately if xmpp is not enabled, otherwise the daemon chews up
|
||||||
|
// lots of CPU trying to connect to unconfigured servers
|
||||||
|
if (common_config('xmpp','enabled')==false) {
|
||||||
|
print "Aborting daemon - xmpp is disabled\n";
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
ini_set("max_execution_time", "0");
|
ini_set("max_execution_time", "0");
|
||||||
ini_set("max_input_time", "0");
|
ini_set("max_input_time", "0");
|
||||||
set_time_limit(0);
|
set_time_limit(0);
|
||||||
|
|
|
@ -140,6 +140,13 @@ class XmppConfirmHandler extends XmppQueueHandler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Abort immediately if xmpp is not enabled, otherwise the daemon chews up
|
||||||
|
// lots of CPU trying to connect to unconfigured servers
|
||||||
|
if (common_config('xmpp','enabled')==false) {
|
||||||
|
print "Aborting daemon - xmpp is disabled\n";
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
ini_set("max_execution_time", "0");
|
ini_set("max_execution_time", "0");
|
||||||
ini_set("max_input_time", "0");
|
ini_set("max_input_time", "0");
|
||||||
set_time_limit(0);
|
set_time_limit(0);
|
||||||
|
|
|
@ -321,6 +321,13 @@ class XMPPDaemon extends Daemon
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Abort immediately if xmpp is not enabled, otherwise the daemon chews up
|
||||||
|
// lots of CPU trying to connect to unconfigured servers
|
||||||
|
if (common_config('xmpp','enabled')==false) {
|
||||||
|
print "Aborting daemon - xmpp is disabled\n";
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
ini_set("max_execution_time", "0");
|
ini_set("max_execution_time", "0");
|
||||||
ini_set("max_input_time", "0");
|
ini_set("max_input_time", "0");
|
||||||
set_time_limit(0);
|
set_time_limit(0);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user