diff --git a/application/core/ManiaControl.php b/application/core/ManiaControl.php index de4a2aac..6bf09c79 100644 --- a/application/core/ManiaControl.php +++ b/application/core/ManiaControl.php @@ -271,11 +271,11 @@ class ManiaControl implements CommandListener { public function run() { $this->log('Starting ManiaControl v' . self::VERSION . '!'); - // Connect to server - $this->connect(); - // Register shutdown handler register_shutdown_function(array($this, 'handleShutdown')); + + // Connect to server + $this->connect(); // OnInit callback $this->callbackManager->triggerCallback(CallbackManager::CB_MC_ONINIT, array(CallbackManager::CB_MC_ONINIT));