Update RPC client for JSON rework and add missing arg in json_request_text
Fixes #60
This commit is contained in:
parent
2b1d236b0d
commit
e17a9ee2c7
@ -25,7 +25,10 @@ class RPCClient(JSONRPC):
|
||||
async def send_and_wait(self, method, params, timeout=None):
|
||||
# Raise incoming buffer size - presumably connection is trusted
|
||||
self.max_buffer_size = 5000000
|
||||
self.send_json_request(method, id_=method, params=params)
|
||||
self.send_text(self.json_request_text(method,
|
||||
id_=method,
|
||||
params=params),
|
||||
False)
|
||||
|
||||
future = asyncio.ensure_future(self.messages.get())
|
||||
for f in asyncio.as_completed([future], timeout=timeout):
|
||||
|
||||
@ -237,7 +237,7 @@ class JSONRPC(asyncio.Protocol, LoggedClass):
|
||||
|
||||
def json_request_text(self, method, id_, params=None):
|
||||
'''Return the text of a JSON request.'''
|
||||
return self.encode_payload(json_request_payload(method, params))
|
||||
return self.encode_payload(json_request_payload(method, id_, params))
|
||||
|
||||
def json_response_text(self, result, id_):
|
||||
'''Return the text of a JSON response.'''
|
||||
|
||||
Loading…
Reference in New Issue
Block a user