Skip to content

Commit

Permalink
Merge pull request #25 from dnna/master
Browse files Browse the repository at this point in the history
fclose lock files when released
  • Loading branch information
arvenil committed Feb 26, 2016
2 parents 1165c85 + 3a91823 commit 69f6a0c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/NinjaMutex/Lock/FlockLock.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ public function releaseLock($name)
if (isset($this->files[$name])) {
flock($this->files[$name], LOCK_UN); // @todo Can LOCK_UN fail?
unset($this->locks[$name]);
fclose($this->files[$name]);
unset($this->files[$name]);

return true;
}
Expand Down

0 comments on commit 69f6a0c

Please sign in to comment.