mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-26 13:59:59 +00:00
encode: delay completion until all our messages have been delivered
This commit is contained in:
parent
9a555e6710
commit
1ba241e071
@ -7,9 +7,10 @@ class Encoder(object):
|
|||||||
self.m = m
|
self.m = m
|
||||||
|
|
||||||
def do_upload(self, landlords):
|
def do_upload(self, landlords):
|
||||||
|
dl = []
|
||||||
data = self.infile.read()
|
data = self.infile.read()
|
||||||
for (peerid, bucket_num, remotebucket) in landlords:
|
for (peerid, bucket_num, remotebucket) in landlords:
|
||||||
remotebucket.callRemote('write', data)
|
dl.append(remotebucket.callRemote('write', data))
|
||||||
remotebucket.callRemote('finalise')
|
dl.append(remotebucket.callRemote('close'))
|
||||||
|
|
||||||
return defer.succeed()
|
return defer.DeferredList(dl)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user