aboutsummaryrefslogtreecommitdiffstats
path: root/includes/filerepo/backend/lockmanager
diff options
context:
space:
mode:
Diffstat (limited to 'includes/filerepo/backend/lockmanager')
-rw-r--r--includes/filerepo/backend/lockmanager/FSLockManager.php12
1 files changed, 4 insertions, 8 deletions
diff --git a/includes/filerepo/backend/lockmanager/FSLockManager.php b/includes/filerepo/backend/lockmanager/FSLockManager.php
index 2b727a8fd3ea..4f3b9596ec18 100644
--- a/includes/filerepo/backend/lockmanager/FSLockManager.php
+++ b/includes/filerepo/backend/lockmanager/FSLockManager.php
@@ -239,15 +239,11 @@ class FSLockManager extends LockManager {
return "{$this->lockDir}/{$hash}.lock";
}
- /**
- * Make sure remaining locks get cleared for sanity
- */
function __destruct() {
- while ( count( $this->locksHeld ) ) {
- foreach ( $this->locksHeld as $path => $locks ) {
- $this->doSingleUnlock( $path, self::LOCK_EX );
- $this->doSingleUnlock( $path, self::LOCK_SH );
- }
+ // Make sure remaining locks get cleared for sanity
+ foreach ( $this->locksHeld as $path => $locks ) {
+ $this->doSingleUnlock( $path, self::LOCK_EX );
+ $this->doSingleUnlock( $path, self::LOCK_SH );
}
}
}