]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
fix losing-client-connection handler
authorBrian Warner <warner@lothar.com>
Fri, 1 Dec 2006 01:13:46 +0000 (18:13 -0700)
committerBrian Warner <warner@lothar.com>
Fri, 1 Dec 2006 01:13:46 +0000 (18:13 -0700)
allmydata/client.py

index 908a2e31c6c387b51fbcadad6cb5ccc4830556d8..44f65d561b0f2b3cde28135e9dea9de3bf94827a 100644 (file)
@@ -88,6 +88,7 @@ class Client(service.MultiService, Referenceable):
             if nodeid not in self.connections:
                 d = self.tub.getReference(pburl)
                 def _got_reference(ref):
+                    log.msg("connected to %s" % nodeid)
                     if nodeid in self.all_peers:
                         self.connections[nodeid] = ref
                 d.addCallback(_got_reference)
@@ -96,7 +97,7 @@ class Client(service.MultiService, Referenceable):
         for nodeid in lost_peers:
             log.msg("lost peer %s" % nodeid)
             if nodeid in self.all_peers:
-                del self.all_peers[nodeid]
+                self.all_peers.remove(nodeid)
             else:
                 log.msg("weird, I didn't have an entry for them")
             if nodeid in self.connections: