diff options
author | Dries Buytaert <dries@buytaert.net> | 2011-07-31 23:34:22 -0400 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2011-07-31 23:34:22 -0400 |
commit | f60942fed0ff266aa2456ba4e5ecc2ba3e64bc3d (patch) | |
tree | 69580141d9f8b9a7cb176f30a437628ed3d47e91 /includes/lock.inc | |
parent | 452d443c2267b95b213a00f129660f833c3c01c9 (diff) | |
download | brdo-f60942fed0ff266aa2456ba4e5ecc2ba3e64bc3d.tar.gz brdo-f60942fed0ff266aa2456ba4e5ecc2ba3e64bc3d.tar.bz2 |
- Patch #1216886 by pounard: _lock_id() shouldn't use drupal_static(), any cache clear would potentially make locks stall.
Diffstat (limited to 'includes/lock.inc')
-rw-r--r-- | includes/lock.inc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/includes/lock.inc b/includes/lock.inc index 42f1906f2..7dd8db30a 100644 --- a/includes/lock.inc +++ b/includes/lock.inc @@ -74,7 +74,10 @@ function lock_initialize() { * Helper function to get this request's unique id. */ function _lock_id() { - $lock_id = &drupal_static(__FUNCTION__); + // Do not use drupal_static(). This identifier refers to the current + // client request, and must not be changed under any circumstances + // else the shutdown handler may fail to release our locks. + static $lock_id; if (!isset($lock_id)) { // Assign a unique id. |