From c0f4c460c1369eb172719d166e9dfc6ea278e73a Mon Sep 17 00:00:00 2001 From: kremsy Date: Fri, 14 Feb 2014 13:51:23 +0100 Subject: [PATCH] connection interrupted exception --- application/core/ManiaControl.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/application/core/ManiaControl.php b/application/core/ManiaControl.php index 5ba2ba8e..fedf0f86 100644 --- a/application/core/ManiaControl.php +++ b/application/core/ManiaControl.php @@ -299,11 +299,18 @@ class ManiaControl implements CommandListener { // Disable script timeout set_time_limit(self::SCRIPT_TIMEOUT); - // Manager callbacks - $this->callbackManager->manageCallbacks(); + try { + // Manager callbacks + $this->callbackManager->manageCallbacks(); - // Manage FileReader - $this->fileReader->appendData(); + // Manage FileReader + $this->fileReader->appendData(); + + } catch(Exception $e) { + if ($e->getMessage() == 'Connection interupted') { + $this->quit($e->getMessage()); + } + } // Yield for next tick $loopEnd = microtime(true);