From 887f27d513180e43cb62a47934077ee87320a377 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 3 Aug 2019 11:34:36 +0200 Subject: [PATCH] [Mailer] fixed wrong error message when connection closes unexpectedly --- .../Component/Mailer/Transport/Smtp/Stream/AbstractStream.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Symfony/Component/Mailer/Transport/Smtp/Stream/AbstractStream.php b/src/Symfony/Component/Mailer/Transport/Smtp/Stream/AbstractStream.php index 5d9e2715c3..1d7d1b0177 100644 --- a/src/Symfony/Component/Mailer/Transport/Smtp/Stream/AbstractStream.php +++ b/src/Symfony/Component/Mailer/Transport/Smtp/Stream/AbstractStream.php @@ -74,6 +74,9 @@ abstract class AbstractStream if ($metas['timed_out']) { throw new TransportException(sprintf('Connection to "%s" timed out.', $this->getReadConnectionDescription())); } + if ($metas['eof']) { + throw new TransportException(sprintf('Connection to "%s" has been closed unexpectedly.', $this->getReadConnectionDescription())); + } } return $line;