Skip to content

Commit

Permalink
Remove exception overwrite
Browse files Browse the repository at this point in the history
Copy/paste oversight.
  • Loading branch information
trowski committed Apr 5, 2018
1 parent 1b75b12 commit 24b2530
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/ResourceOutputStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function __construct($stream, int $chunkSize = null) {
// Broken pipes between processes on macOS/FreeBSD do not detect EOF properly.
if ($written === 0) {
if ($emptyWrites++ > self::MAX_CONSECUTIVE_EMPTY_WRITES) {
$message = "Failed to write to stream";
$message = "Failed to write to stream after multiple attempts";
if ($error = \error_get_last()) {
$message .= \sprintf("; %s", $error["message"]);
}
Expand All @@ -110,7 +110,6 @@ public function __construct($stream, int $chunkSize = null) {
$resource = null;
$writable = false;

$exception = new StreamException("The stream was closed by the peer");
$deferred->fail($exception);
while (!$writes->isEmpty()) {
list(, , $deferred) = $writes->shift();
Expand Down

0 comments on commit 24b2530

Please sign in to comment.