diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c5093573..79ba52f7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ at anytime. ### Fixed * daemon cli spelling fixes - * + * high CPU usage when a stream is incomplete and the peers we're requesting from have no more blobs to send us ### Deprecated * diff --git a/lbrynet/core/client/BlobRequester.py b/lbrynet/core/client/BlobRequester.py index 852942138..2e1dce2f1 100644 --- a/lbrynet/core/client/BlobRequester.py +++ b/lbrynet/core/client/BlobRequester.py @@ -354,6 +354,10 @@ class AvailabilityRequest(RequestHelper): log.debug("Received a response to the availability request") # save available blobs blob_hashes = response_dict['available_blobs'] + if not blob_hashes: + # should not send any more requests as it doesnt have any blob we need + self.peer.update_score(-10.0) + return True for blob_hash in blob_hashes: if blob_hash in request.request_dict['requested_blobs']: self.process_available_blob_hash(blob_hash, request)