stopProducing in reflector client file_sender when uploading is done
this fixes exceptions.ValueError: I/O operation on closed file in twisted.protocols.basic.ResumeProducing
This commit is contained in:
parent
df40c7fb76
commit
a58a81a841
1 changed files with 2 additions and 0 deletions
|
@ -145,9 +145,11 @@ class EncryptedFileReflectorClient(Protocol):
|
||||||
|
|
||||||
def set_not_uploading(self):
|
def set_not_uploading(self):
|
||||||
if self.next_blob_to_send is not None:
|
if self.next_blob_to_send is not None:
|
||||||
|
log.debug("Close %s", self.next_blob_to_send)
|
||||||
self.next_blob_to_send.close_read_handle(self.read_handle)
|
self.next_blob_to_send.close_read_handle(self.read_handle)
|
||||||
self.read_handle = None
|
self.read_handle = None
|
||||||
self.next_blob_to_send = None
|
self.next_blob_to_send = None
|
||||||
|
self.file_sender.stopProducing()
|
||||||
self.file_sender = None
|
self.file_sender = None
|
||||||
return defer.succeed(None)
|
return defer.succeed(None)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue