From dd07e795377b94802205afd58ac3d1c9f401cdbc Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Tue, 15 Feb 2011 08:24:47 -0500
Subject: [PATCH] - Close IMAP connection after SMTP, per discussion in (#1485975)

---
 program/include/rcmail.php |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index 1c98106..319e53c 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -1060,9 +1060,6 @@
    */
   public function shutdown()
   {
-    if (is_object($this->imap))
-      $this->imap->close();
-
     if (is_object($this->smtp))
       $this->smtp->disconnect();
 
@@ -1073,6 +1070,9 @@
         $book->close();
     }
 
+    if (is_object($this->imap))
+      $this->imap->close();
+
     // before closing the database connection, write session data
     if ($_SERVER['REMOTE_ADDR'])
       session_write_close();

--
Gitblit v1.9.1