Skip to content

Commit

Permalink
Pass timeout to end()
Browse files Browse the repository at this point in the history
  • Loading branch information
trowski committed Dec 11, 2015
1 parent ec32a1f commit 9ef7200
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function pipe(
);

if ($end && $destination->isWritable()) {
yield $destination->end();
yield $destination->end('', $timeout);
}

yield $bytes;
Expand Down
4 changes: 2 additions & 2 deletions tests/FunctionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public function testPipeEndOnUnexpectedClose()
};
$stream->write(self::WRITE_STRING, 0)->willReturn($generator());

$stream->end()->shouldBeCalled();
$stream->end('', 0)->shouldBeCalled();

$promise = new Coroutine(Stream\pipe($readable, $stream->reveal(), true));

Expand Down Expand Up @@ -528,7 +528,7 @@ public function testPipeToEndOnUnexpectedClose()
};
$stream->write(self::WRITE_STRING, 0)->willReturn($generator());

$stream->end()->shouldBeCalled();
$stream->end('', 0)->shouldBeCalled();

$promise = new Coroutine(Stream\pipe($readable, $stream->reveal(), true, 0, '!'));

Expand Down

0 comments on commit 9ef7200

Please sign in to comment.