diff options
author | Robin McCorkell <robin@mccorkell.me.uk> | 2016-04-26 22:30:09 +0100 |
---|---|---|
committer | Robin McCorkell <robin@mccorkell.me.uk> | 2016-04-26 22:30:09 +0100 |
commit | 77cec29b108df7d9c868d60baf74fbe9b64e08f5 (patch) | |
tree | 4aed288c81298015c85ec8f14acb54f5345e061b /lib | |
parent | ddbebe91f0ea0c6a938991b929ffdb71bbb2cc16 (diff) | |
download | nextcloud-server-77cec29b108df7d9c868d60baf74fbe9b64e08f5.tar.gz nextcloud-server-77cec29b108df7d9c868d60baf74fbe9b64e08f5.zip |
Prevent concurrent availability checks
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/Storage/Wrapper/Availability.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/Files/Storage/Wrapper/Availability.php b/lib/private/Files/Storage/Wrapper/Availability.php index 0ed31ba854a..8d6fc4b3369 100644 --- a/lib/private/Files/Storage/Wrapper/Availability.php +++ b/lib/private/Files/Storage/Wrapper/Availability.php @@ -40,9 +40,13 @@ class Availability extends Wrapper { } /** + * Only called if availability === false + * * @return bool */ private function updateAvailability() { + // reset availability to false so that multiple requests don't recheck concurrently + $this->setAvailability(false); try { $result = $this->test(); } catch (\Exception $e) { |