diff --git a/lbrynet/stream/descriptor.py b/lbrynet/stream/descriptor.py index 80d067ca4..d73369110 100644 --- a/lbrynet/stream/descriptor.py +++ b/lbrynet/stream/descriptor.py @@ -134,6 +134,7 @@ class StreamDescriptor: try: decoded = json.loads(json_bytes.decode()) except json.JSONDecodeError: + blob.delete() raise InvalidStreamDescriptorError("Does not decode as valid JSON") if decoded['blobs'][-1]['length'] != 0: raise InvalidStreamDescriptorError("Does not end with a zero-length blob.")