From: Brian Warner Date: Fri, 1 Dec 2006 01:13:46 +0000 (-0700) Subject: fix losing-client-connection handler X-Git-Tag: tahoe_v0.1.0-0-UNSTABLE~529 X-Git-Url: https://git.rkrishnan.org/components/com_hotproperty/flags/index.php?a=commitdiff_plain;h=f49a7a95c77cc7267f048919ddab00f7ddc9c3fb;p=tahoe-lafs%2Ftahoe-lafs.git fix losing-client-connection handler --- diff --git a/allmydata/client.py b/allmydata/client.py index 908a2e31..44f65d56 100644 --- a/allmydata/client.py +++ b/allmydata/client.py @@ -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: