diff --git a/lbrynet/core/StreamCreator.py b/lbrynet/core/StreamCreator.py index 4aa0ae542..3b7877f91 100644 --- a/lbrynet/core/StreamCreator.py +++ b/lbrynet/core/StreamCreator.py @@ -51,13 +51,18 @@ class StreamCreator(object): current_blob = self.current_blob d = current_blob.close() d.addCallback(self._blob_finished) + d.addErrback(self._error) self.finished_deferreds.append(d) self.current_blob = None self._finalize() dl = defer.DeferredList(self.finished_deferreds) dl.addCallback(lambda _: self._finished()) + dl.addErrback(self._error) return dl + def _error(self, error): + log.error(error) + def _finalize(self): pass diff --git a/lbrynet/cryptstream/CryptStreamCreator.py b/lbrynet/cryptstream/CryptStreamCreator.py index e5b3c8bf3..782eda0f1 100644 --- a/lbrynet/cryptstream/CryptStreamCreator.py +++ b/lbrynet/cryptstream/CryptStreamCreator.py @@ -80,6 +80,7 @@ class CryptStreamCreator(StreamCreator): def close_blob(blob): d = blob.close() d.addCallback(self._blob_finished) + d.addErrback(self._error) self.finished_deferreds.append(d) while len(data) > 0: