From 278a1df06da872d61032733e2d09a5c4ba6568f6 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Sun, 18 Nov 2012 15:00:34 +0000 Subject: [PATCH] statusicon: start on a new thread when forcing a retry --- SparkleLib/Git/SparkleRepoGit.cs | 4 +++- SparkleShare/SparkleControllerBase.cs | 4 +++- SparkleShare/SparkleStatusIconController.cs | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/SparkleLib/Git/SparkleRepoGit.cs b/SparkleLib/Git/SparkleRepoGit.cs index 5922a400..f452b2cc 100644 --- a/SparkleLib/Git/SparkleRepoGit.cs +++ b/SparkleLib/Git/SparkleRepoGit.cs @@ -668,7 +668,9 @@ namespace SparkleLib.Git { Error = ErrorStatus.HostIdentityChanged; - } else if (line.StartsWith ("Permission denied")) { + } else if (line.StartsWith ("Permission denied") || + line.StartsWith ("ssh_exchange_identification: Connection closed by remote host")) { + Error = ErrorStatus.AuthenticationFailed; } else if (line.StartsWith ("error: Disk space exceeded")) { diff --git a/SparkleShare/SparkleControllerBase.cs b/SparkleShare/SparkleControllerBase.cs index b4d35d6f..1ee73f95 100644 --- a/SparkleShare/SparkleControllerBase.cs +++ b/SparkleShare/SparkleControllerBase.cs @@ -336,7 +336,9 @@ namespace SparkleShare { ProgressSpeedDown += rep.ProgressSpeed; } - ProgressPercentage = percentage / repo_count; + if (repo_count > 0) + ProgressPercentage = percentage / repo_count; + UpdateState (); }; diff --git a/SparkleShare/SparkleStatusIconController.cs b/SparkleShare/SparkleStatusIconController.cs index 7792ac4d..afcff63f 100755 --- a/SparkleShare/SparkleStatusIconController.cs +++ b/SparkleShare/SparkleStatusIconController.cs @@ -209,7 +209,7 @@ namespace SparkleShare { { foreach (SparkleRepoBase repo in Program.Controller.Repositories) { if (repo.Name.Equals (subfolder)) - repo.ForceRetry (); + new Thread (() => repo.ForceRetry ()).Start (); } }