node-proper-lockfile icon indicating copy to clipboard operation
node-proper-lockfile copied to clipboard

fix: consider locks acquired in the future to be stale

Open AlCalzone opened this issue 3 years ago • 0 comments

We're sometimes running into a situation where a hard system restart causes the system time to jump backwards. This causes locks to remain with an mtime in the future, unable to lock them.

This PR considers the stale interval in both directions. Any lock that is stale milliseconds older or newer than now() will be considered stale.

AlCalzone avatar Sep 06 '22 11:09 AlCalzone