fix: Close playlist streams correctly

This commit is contained in:
Pierre Rudloff 2019-04-20 00:37:49 +02:00
parent cd623bfa36
commit 4537b661e1
2 changed files with 22 additions and 0 deletions

View file

@ -208,4 +208,16 @@ class PlaylistArchiveStream extends TarArchive
return fread($this->buffer, $count);
}
/**
* Called when fclose() is used on the stream.
*
* @return void
*/
public function stream_close()
{
if (is_resource($this->buffer)) {
fclose($this->buffer);
}
}
}