X Tutup
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Try to detect the connection status after flush() - this might lead t…
…o earlier detection of a broken connection
  • Loading branch information
DeepDiver1975 authored and phil-davis committed Jun 12, 2020
commit 22f8690620bbcd320734ea0f745d33bdd4efcef5
6 changes: 6 additions & 0 deletions changelog/unreleased/37291
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Earlier detection of connection status

On public video streaming the connection is detected to reduce server load #37219
To optimize this the connection status is queried after flush()

https://github.com/owncloud/core/pull/37291
4 changes: 2 additions & 2 deletions lib/private/Files/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,8 @@ public function readfile($path) {
$size = $this->filesize($path);
while (!\feof($handle)) {
echo \fread($handle, $chunkSize);
$this->checkConnectionStatus();
\flush();
$this->checkConnectionStatus();
}
return $size;
}
Expand Down Expand Up @@ -505,8 +505,8 @@ public function readfilePart($path, $from, $to) {
$len = $chunkSize;
}
echo \fread($handle, $len);
$this->checkConnectionStatus();
\flush();
$this->checkConnectionStatus();
}
return \ftell($handle) - $from;
}
Expand Down
X Tutup