mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-21 13:57:51 +00:00
fix losing-client-connection handler
This commit is contained in:
parent
646f888bbd
commit
f49a7a95c7
@ -88,6 +88,7 @@ class Client(service.MultiService, Referenceable):
|
|||||||
if nodeid not in self.connections:
|
if nodeid not in self.connections:
|
||||||
d = self.tub.getReference(pburl)
|
d = self.tub.getReference(pburl)
|
||||||
def _got_reference(ref):
|
def _got_reference(ref):
|
||||||
|
log.msg("connected to %s" % nodeid)
|
||||||
if nodeid in self.all_peers:
|
if nodeid in self.all_peers:
|
||||||
self.connections[nodeid] = ref
|
self.connections[nodeid] = ref
|
||||||
d.addCallback(_got_reference)
|
d.addCallback(_got_reference)
|
||||||
@ -96,7 +97,7 @@ class Client(service.MultiService, Referenceable):
|
|||||||
for nodeid in lost_peers:
|
for nodeid in lost_peers:
|
||||||
log.msg("lost peer %s" % nodeid)
|
log.msg("lost peer %s" % nodeid)
|
||||||
if nodeid in self.all_peers:
|
if nodeid in self.all_peers:
|
||||||
del self.all_peers[nodeid]
|
self.all_peers.remove(nodeid)
|
||||||
else:
|
else:
|
||||||
log.msg("weird, I didn't have an entry for them")
|
log.msg("weird, I didn't have an entry for them")
|
||||||
if nodeid in self.connections:
|
if nodeid in self.connections:
|
||||||
|
Loading…
Reference in New Issue
Block a user