summaryrefslogtreecommitdiff
path: root/program/include/main.inc
diff options
context:
space:
mode:
Diffstat (limited to 'program/include/main.inc')
-rw-r--r--program/include/main.inc5
1 files changed, 4 insertions, 1 deletions
diff --git a/program/include/main.inc b/program/include/main.inc
index f938174d6..bd4ebd0ef 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -299,7 +299,7 @@ function rcmail_set_imap_prop()
*/
function rcmail_shutdown()
{
- global $IMAP;
+ global $IMAP, $CONTACTS;
if (is_object($IMAP))
{
@@ -307,6 +307,9 @@ function rcmail_shutdown()
$IMAP->write_cache();
}
+ if (is_object($CONTACTS))
+ $CONTACTS->close();
+
// before closing the database connection, write session data
session_write_close();
}