From a58a81a8413d08120af0f60e5e167679a732a66b Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Tue, 7 Feb 2017 14:27:05 -0500 Subject: [PATCH] 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 --- lbrynet/reflector/client/client.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lbrynet/reflector/client/client.py b/lbrynet/reflector/client/client.py index 31eda8d31..9b2bd94bc 100644 --- a/lbrynet/reflector/client/client.py +++ b/lbrynet/reflector/client/client.py @@ -145,9 +145,11 @@ class EncryptedFileReflectorClient(Protocol): def set_not_uploading(self): 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.read_handle = None self.next_blob_to_send = None + self.file_sender.stopProducing() self.file_sender = None return defer.succeed(None)