repo: don't allow multiple syncs at the same time on startup. Fixes #985
This commit is contained in:
parent
05101acf28
commit
4118f1949c
|
@ -911,8 +911,9 @@ namespace SparkleLib.Git {
|
|||
}
|
||||
}
|
||||
|
||||
git_status.StandardOutput.ReadToEnd();
|
||||
git_status.StandardOutput.ReadToEnd ();
|
||||
git_status.WaitForExit ();
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
|
|
|
@ -193,10 +193,10 @@ namespace SparkleLib {
|
|||
|
||||
// Sync up everything that changed
|
||||
// since we've been offline
|
||||
if (HasLocalChanges) {
|
||||
if (!this.is_syncing && (HasLocalChanges || HasUnsyncedChanges)) {
|
||||
SyncUpBase ();
|
||||
|
||||
while (HasUnsyncedChanges)
|
||||
while (HasLocalChanges)
|
||||
SyncUpBase ();
|
||||
}
|
||||
|
||||
|
@ -408,7 +408,7 @@ namespace SparkleLib {
|
|||
this.poll_interval = PollInterval.Long;
|
||||
|
||||
new Thread (() => {
|
||||
if (!is_syncing && !HasLocalChanges && HasRemoteChanges)
|
||||
if (!this.is_syncing && !HasLocalChanges && HasRemoteChanges)
|
||||
SyncDownBase ();
|
||||
|
||||
}).Start ();
|
||||
|
@ -430,7 +430,7 @@ namespace SparkleLib {
|
|||
this.poll_interval = PollInterval.Long;
|
||||
this.last_poll = DateTime.Now;
|
||||
|
||||
if (!is_syncing) {
|
||||
if (!this.is_syncing) {
|
||||
// Check for changes manually one more time
|
||||
if (HasRemoteChanges)
|
||||
SyncDownBase ();
|
||||
|
|
Loading…
Reference in a new issue