Change-Id: I019d24c19f317eb649b5a0415618b453e1ea171b
return "{$this->lockDir}/{$hash}.lock";
}
return "{$this->lockDir}/{$hash}.lock";
}
+ /**
+ * Make sure remaining locks get cleared for sanity
+ */
- // 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 );
+ while ( count( $this->locksHeld ) ) {
+ foreach ( $this->locksHeld as $path => $locks ) {
+ $this->doSingleUnlock( $path, self::LOCK_EX );
+ $this->doSingleUnlock( $path, self::LOCK_SH );
+ }