Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 887f27d

Browse files
committed
[Mailer] fixed wrong error message when connection closes unexpectedly
1 parent e248345 commit 887f27d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Symfony/Component/Mailer/Transport/Smtp/Stream/AbstractStream.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ public function readLine(): string
7474
if ($metas['timed_out']) {
7575
throw new TransportException(sprintf('Connection to "%s" timed out.', $this->getReadConnectionDescription()));
7676
}
77+
if ($metas['eof']) {
78+
throw new TransportException(sprintf('Connection to "%s" has been closed unexpectedly.', $this->getReadConnectionDescription()));
79+
}
7780
}
7881

7982
return $line;

0 commit comments

Comments
 (0)