Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2e9669f

Browse filesBrowse files
committed
[Mailer] Thrown TransportException when unable to read from socket
1 parent f689d87 commit 2e9669f
Copy full SHA for 2e9669f

File tree

1 file changed

+4
-1
lines changed
Filter options

1 file changed

+4
-1
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Mailer/Transport/Smtp/Stream/AbstractStream.php
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function readLine(): string
7474
return '';
7575
}
7676

77-
$line = fgets($this->out);
77+
$line = @fgets($this->out);
7878
if ('' === $line || false === $line) {
7979
$metas = stream_get_meta_data($this->out);
8080
if ($metas['timed_out']) {
@@ -83,6 +83,9 @@ public function readLine(): string
8383
if ($metas['eof']) {
8484
throw new TransportException(sprintf('Connection to "%s" has been closed unexpectedly.', $this->getReadConnectionDescription()));
8585
}
86+
if (false === $line) {
87+
throw new TransportException(sprintf('Unable to read from connection to "%s".', $this->getReadConnectionDescription()));
88+
}
8689
}
8790

8891
$this->debug .= sprintf('< %s', $line);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.