Skip to content

Commit 3fe5ef6

Browse files
author
yiqin.li
committed
bug fix, in some case stream reading functions may block indefinitely.
1 parent 7cb7b8b commit 3fe5ef6

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/private/Preview/Movie.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ private function generateThumbNail(int $maxX, int $maxY, string $absPath, int $s
144144
$returnCode = -1;
145145
$output = "";
146146
if (is_resource($proc)) {
147+
stream_set_blocking($pipes[1], 0);
148+
stream_set_blocking($pipes[2], 0);
147149
$stdout = trim(stream_get_contents($pipes[1]));
148150
$stderr = trim(stream_get_contents($pipes[2]));
149151
$returnCode = proc_close($proc);

0 commit comments

Comments
 (0)