forked from LBRYCommunity/lbry-sdk
fix peer_ping
This commit is contained in:
parent
95cb29d3c8
commit
a32a0c6401
1 changed files with 2 additions and 2 deletions
|
@ -2640,7 +2640,7 @@ class Daemon(AuthJSONRPCServer):
|
||||||
peers = yield finished_deferred
|
peers = yield finished_deferred
|
||||||
results = [
|
results = [
|
||||||
{
|
{
|
||||||
"node_id": node_id.encode('hex'),
|
"node_id": hexlify(node_id).decode(),
|
||||||
"host": host,
|
"host": host,
|
||||||
"port": port
|
"port": port
|
||||||
}
|
}
|
||||||
|
@ -2859,7 +2859,7 @@ class Daemon(AuthJSONRPCServer):
|
||||||
if not contact:
|
if not contact:
|
||||||
defer.returnValue({'error': 'peer not found'})
|
defer.returnValue({'error': 'peer not found'})
|
||||||
try:
|
try:
|
||||||
result = yield contact.ping()
|
result = (yield contact.ping()).decode()
|
||||||
except TimeoutError:
|
except TimeoutError:
|
||||||
result = {'error': 'ping timeout'}
|
result = {'error': 'ping timeout'}
|
||||||
defer.returnValue(result)
|
defer.returnValue(result)
|
||||||
|
|
Loading…
Reference in a new issue