Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(server/inventory): possible race condition when saving?
Potential race condition where an item is moved, a save is triggered, and the inventory is removed from memory (before the save completes). Opening the inventory after it is removed (Inventory.Remove) causes it to re-fetch from the database, which might contain old save data. This was tested by adding a large delay (5s) before triggering the save, and removing the time check for removal (i.e. the inventory is only removed if not used for 20m). Would be hard to consistently repro. - take 1 burger from stash - stash is not opened for 20 minutes - save is initiated and the stash is cleared from memory - player opens the stash before db is updated, gets old stash data - burger is back Hitches, slow db access, or large save data would increase the window for this to occur.
- Loading branch information