Skip to content

Commit

Permalink
don't trigger error if a stream is closed during a data event
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaud-lb committed Oct 28, 2012
1 parent c342963 commit f79b9ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Stream.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public function handleData($stream)

$this->emit('data', array($data, $this));

if (feof($stream)) {
if (!is_resource($stream) || feof($stream)) {
$this->end();
}
}
Expand Down

0 comments on commit f79b9ad

Please sign in to comment.