From 1c283c2d9cf66496245457367285491ad5f3552e Mon Sep 17 00:00:00 2001 From: wimh Date: Sat, 23 Jul 2011 21:04:32 +0100 Subject: [PATCH] avatars: don't download further if there's no internet connection --- SparkleShare/SparkleController.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SparkleShare/SparkleController.cs b/SparkleShare/SparkleController.cs index 5c6fb265..d5519a99 100644 --- a/SparkleShare/SparkleController.cs +++ b/SparkleShare/SparkleController.cs @@ -944,8 +944,12 @@ namespace SparkleShare { SparkleHelpers.DebugInfo ("Controller", "Fetched gravatar for " + email); } - } catch (WebException) { + } catch (WebException e) { SparkleHelpers.DebugInfo ("Controller", "Failed fetching gravatar for " + email); + + // Stop downloading further avatars if we have no internet access + if (e.Status == WebExceptionStatus.Timeout) + break; } } }