fix error when pcntl extension is not loaded
This commit is contained in:
@ -653,9 +653,11 @@ class ManiaControl implements CallbackListener, CommandListener, TimerListener,
|
||||
|
||||
try {
|
||||
// Manage SIGTERM signal
|
||||
pcntl_signal(SIGTERM, function() {
|
||||
$this->quit("Stop signal received from the OS.", false);
|
||||
});
|
||||
if (extension_loaded('pcntl')) {
|
||||
pcntl_signal(SIGTERM, function() {
|
||||
$this->quit("Stop signal received from the OS.", false);
|
||||
});
|
||||
}
|
||||
|
||||
// Connect to server
|
||||
$this->connect();
|
||||
|
Reference in New Issue
Block a user