From c73e3637a34de675c095cc95b882d668fbb73974 Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Tue, 27 Feb 2024 15:12:42 +0100 Subject: [PATCH] Resolve #1455 --- .../v/0.0.0/app/libraries/MailSo/Sieve/SieveClient.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Sieve/SieveClient.php b/snappymail/v/0.0.0/app/libraries/MailSo/Sieve/SieveClient.php index 65dced595..669273225 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Sieve/SieveClient.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Sieve/SieveClient.php @@ -184,7 +184,12 @@ class SieveClient extends \MailSo\Net\NetClient public function Logout() : void { if ($this->bIsLoggined) { - $this->sendRequestWithCheck('LOGOUT'); + try { + $this->sendRequestWithCheck('LOGOUT'); + } catch (\Throwable $e) { + // https://github.com/the-djmaze/snappymail/issues/1455 + $this->writeLogException($e, \LOG_WARNING, false); + } $this->bIsLoggined = false; } } @@ -408,6 +413,7 @@ class SieveClient extends \MailSo\Net\NetClient if (null === $sResponseBuffer) { break; } + // \MailSo\Imap\Enumerations\ResponseStatus $bEnd = \in_array(\substr($sResponseBuffer, 0, 2), array('OK', 'NO')); // convertEndOfLine $sLine = \trim($sResponseBuffer);