better handle download failures
authorDavid Stainton <dstainton415@gmail.com>
Wed, 15 Jul 2015 19:18:05 +0000 (12:18 -0700)
committerDavid Stainton <dstainton415@gmail.com>
Wed, 15 Jul 2015 19:18:05 +0000 (12:18 -0700)
src/allmydata/frontends/magic_folder.py

index 31407a649c7fd1cc2cd9b0e6c2aa12f2d14c1725..9e83c3f1cafc79966171ec1554c2f01bed9d793f 100644 (file)
@@ -215,7 +215,9 @@ class MagicFolder(service.MultiService):
             self._stats_provider.count('magic_folder.objects_downloaded', 1)
             return None
         def failed(f):
-            return Failure("download failed")
+            self._log("download failed")
+            self._stats_provider.count('magic_folder.objects_download_failed', 1)
+            return f
         def remove_from_pending(result):
             self._download_pending = self._download_pending.difference(set([name]))
         d.addCallbacks(succeeded, failed)