summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
Diffstat (limited to 'program')
-rw-r--r--program/include/rcube_imap.php3
-rw-r--r--program/include/rcube_imap_generic.php2
2 files changed, 2 insertions, 3 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index 3d9253975..2151f5c2b 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -156,8 +156,7 @@ class rcube_imap
*/
function close()
{
- if ($this->conn && $this->conn->connected())
- $this->conn->close();
+ $this->conn->close();
$this->write_cache();
}
diff --git a/program/include/rcube_imap_generic.php b/program/include/rcube_imap_generic.php
index 2dc1e3750..96865e237 100644
--- a/program/include/rcube_imap_generic.php
+++ b/program/include/rcube_imap_generic.php
@@ -708,7 +708,7 @@ class rcube_imap_generic
function close()
{
- if ($this->putLine("I LOGOUT")) {
+ if ($this->logged && $this->putLine("I LOGOUT")) {
if (!feof($this->fp))
fgets($this->fp, 1024);
}