SM doesn't know how to log in again on the same connection, so best to actually close...
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 9 Jun 2017 10:25:27 +0000 (10:25 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 9 Jun 2017 10:25:27 +0000 (10:25 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14662 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/imap_general.php

index 414e2a9..34ee573 100755 (executable)
@@ -1063,8 +1063,10 @@ function sqimap_login ($username, $password, $imap_server_address,
 function sqimap_logout ($imap_stream) {
     /* Logout is not valid until the server returns 'BYE'
      * If we don't have an imap_ stream we're already logged out */
-    if(isset($imap_stream) && $imap_stream)
+    if(isset($imap_stream) && $imap_stream) {
         sqimap_run_command($imap_stream, 'LOGOUT', false, $response, $message);
+        fclose($imap_stream);
+    }
 }
 
 /**