Skip to content

Commit f79b9ad

Browse files
committed
don't trigger error if a stream is closed during a data event
1 parent c342963 commit f79b9ad

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Stream.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public function handleData($stream)
117117

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

120-
if (feof($stream)) {
120+
if (!is_resource($stream) || feof($stream)) {
121121
$this->end();
122122
}
123123
}

0 commit comments

Comments
 (0)