Skip to content

Commit 3e8c701

Browse files
committed
Do not yield output, the AsyncServer API does not expect any value
...but it might, see xp-framework/networking#28
1 parent 968b8de commit 3e8c701

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/php/web/handler/FilesFrom.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ private function copy($out, $file, $range) {
7777

7878
$length= $range->length();
7979
while ($length && $chunk= $file->read(min(self::CHUNKSIZE, $length))) {
80-
yield 'write' => $out;
80+
yield 'write' => null;
8181
$out->write($chunk);
8282
$length-= strlen($chunk);
8383
}
@@ -129,7 +129,7 @@ public function serve($request, $response, $target, $mimeType= null) {
129129
$file->open(File::READ);
130130
try {
131131
do {
132-
yield 'write' => $out;
132+
yield 'write' => null;
133133
$out->write($file->read(self::CHUNKSIZE));
134134
} while (!$file->eof());
135135
} finally {

0 commit comments

Comments
 (0)