]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
upload: if we lose the helper, go back to doing direct-to-server uploads instead...
authorBrian Warner <warner@allmydata.com>
Fri, 8 Feb 2008 00:26:59 +0000 (17:26 -0700)
committerBrian Warner <warner@allmydata.com>
Fri, 8 Feb 2008 00:26:59 +0000 (17:26 -0700)
src/allmydata/upload.py

index 3276f5edf3cafc02df60fcfa0b71883abf8b284b..d852f6f1cf2522bf52b223afe5ef6eabc56d704d 100644 (file)
@@ -1023,6 +1023,9 @@ class Uploader(service.MultiService):
 
     def _got_helper(self, helper):
         self._helper = helper
+        helper.notifyOnDisconnect(self._lost_helper)
+    def _lost_helper(self):
+        self._helper = None
 
     def get_helper_info(self):
         # return a tuple of (helper_furl_or_None, connected_bool)