diff --git a/lbrynet/dht/protocol.py b/lbrynet/dht/protocol.py index 448006688..18d55977a 100644 --- a/lbrynet/dht/protocol.py +++ b/lbrynet/dht/protocol.py @@ -120,7 +120,7 @@ class KademliaProtocol(protocol.DatagramProtocol): @defer.inlineCallbacks def sendRPC(self, contact, method, args): - while True: + for _ in range(constants.rpcAttempts): try: response = yield self._sendRPC(contact, method, args) return response