From c76995fa008a8f62d6cdd43e8ba5ebeecd71dbec Mon Sep 17 00:00:00 2001 From: Deon George Date: Wed, 9 Oct 2024 14:11:11 +1100 Subject: [PATCH] Revert 693e88 since unsuccessfully sent mail shouldnt be marked as sent --- app/Classes/File/Send.php | 3 +++ app/Classes/Protocol/Binkp.php | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Classes/File/Send.php b/app/Classes/File/Send.php index 78a50b9..2652dad 100644 --- a/app/Classes/File/Send.php +++ b/app/Classes/File/Send.php @@ -125,6 +125,9 @@ class Send extends Base if ($successful) { $end = time()-$this->start; Log::info(sprintf('%s:- Closing [%s], sent in [%d] with [%s] items',self::LOGKEY,$this->sending->nameas,$end,$this->sending->dbids->count())); + + } else { + Log::alert(sprintf('%s:- Closing [%s], file NOT SENT successfully',self::LOGKEY,$this->sending->nameas)); } $this->sending->close($successful,$node); diff --git a/app/Classes/Protocol/Binkp.php b/app/Classes/Protocol/Binkp.php index 46a1962..335b84b 100644 --- a/app/Classes/Protocol/Binkp.php +++ b/app/Classes/Protocol/Binkp.php @@ -1029,12 +1029,10 @@ final class Binkp extends BaseProtocol * @return bool * @throws \Exception * @todo We need to not add more files this session if a node skips a file - * @todo This incorrectly records the mail/file as sent and thus it is not sent again */ private function M_skip(string $buf): bool { - Log::debug(sprintf('%s:+ Remote request to skip the file for now [%s]',self::LOGKEY,$buf)); - throw new \Exception('We got a skip, but we dont handle it properly'); + Log::alert(sprintf('%s:+ Remote request to skip the file for now [%s]',self::LOGKEY,$buf)); if ($file = $this->file_parse($buf)) { if ($this->send->nameas