From a942e6f3eb758a1ab97f83e81521dda933b65b7e Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Tue, 10 Oct 2017 13:18:38 -0400 Subject: [PATCH] fix args for ping() --- lbrynet/dht/protocol.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lbrynet/dht/protocol.py b/lbrynet/dht/protocol.py index 974c45dfe..96ffd3140 100644 --- a/lbrynet/dht/protocol.py +++ b/lbrynet/dht/protocol.py @@ -382,9 +382,13 @@ class KademliaProtocol(protocol.DatagramProtocol): log.debug("DHT RECV CALL %s %s:%i", method, senderContact.address, senderContact.port) try: - kwargs = {'_rpcNodeID': senderContact.id, '_rpcNodeContact': senderContact} - result = func(*args, **kwargs) + if method != 'ping': + kwargs = {'_rpcNodeID': senderContact.id, '_rpcNodeContact': senderContact} + result = func(*args, **kwargs) + else: + result = func() except Exception, e: + log.exception("error handling request for %s: %s", senderContact.address, method) df.errback(e) else: df.callback(result)