From a674b05e96df547ee7429376a09887351d7e27d1 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Mon, 9 May 2016 19:13:27 -0700 Subject: register shutdown procedure --- boot.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'boot.php') diff --git a/boot.php b/boot.php index a93e09405..4e3412ac0 100755 --- a/boot.php +++ b/boot.php @@ -904,6 +904,7 @@ class App { spl_autoload_register('ZotlabsAutoloader::loader'); self::$meta= new Zotlabs\Web\HttpMeta(); + } public static function get_baseurl($ssl = false) { @@ -1632,6 +1633,7 @@ function login($register = false, $form_id = 'main-login', $hiddens=false) { * @brief Used to end the current process, after saving session state. */ function killme() { + register_shutdown_function('shutdown'); exit; } @@ -1643,6 +1645,11 @@ function goaway($s) { killme(); } +function shutdown() { + global $db; + $db->close(); +} + /** * @brief Returns the entity id of locally logged in account or false. * -- cgit v1.2.3