prevent race condition when handling expired locks
formatting
Merge pull request #18 from samsonradu/master

prevent race condition when handling expired locks