Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2017-01-13 14:55:08 +0300
committerRobin Appelman <robin@icewind.nl>2017-01-23 14:33:20 +0300
commit0aaf209c667250b2b5ad5eedd8af0807136e46d4 (patch)
treebf833bd1a086ef95261f4541d41499b8e80cd0b7 /lib/private/Files/View.php
parent012e52123900dcaab29989ab12b1848abe8d0a11 (diff)
Prevent PHP request to get killed when using fclose callback (#26775)
* Prevent PHP request to get killed when using fclose callback * Add ignore_user_abort everywhere where the time limit is set to 0 Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Files/View.php')
-rw-r--r--lib/private/Files/View.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php
index 909c49197b8..db21d400b39 100644
--- a/lib/private/Files/View.php
+++ b/lib/private/Files/View.php
@@ -1146,6 +1146,8 @@ class View {
$unlockLater = false;
if ($this->lockingEnabled && $operation === 'fopen' && is_resource($result)) {
$unlockLater = true;
+ // make sure our unlocking callback will still be called if connection is aborted
+ ignore_user_abort(true);
$result = CallbackWrapper::wrap($result, null, null, function () use ($hooks, $path) {
if (in_array('write', $hooks)) {
$this->unlockFile($path, ILockingProvider::LOCK_EXCLUSIVE);