🎨 细化云端同步锁提升稳定性 Fix https://github.com/siyuan-note/siyuan/issues/5887

This commit is contained in:
Liang Ding 2022-09-15 23:24:23 +08:00
parent a942ae6a1b
commit b53cb6c78b
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
4 changed files with 20 additions and 2 deletions

View file

@ -63,6 +63,9 @@ func SyncData(boot, exit, byHand bool) {
return
}
writingDataLock.Lock()
defer writingDataLock.Unlock()
if util.IsMutexLocked(&syncLock) {
logging.LogWarnf("sync is in progress")
planSyncAfter(30 * time.Second)