mirror of
https://github.com/restic/restic.git
synced 2026-05-12 21:45:24 +00:00
13fbc96ed3
The lock test creates a lock and checks that it is not stale. However, it is possible that the lock is refreshed concurrently, which updates the lock timestamp. Checking the timestamp in `Stale()` without synchronization results in a data race. Thus add a lock to prevent concurrent accesses.