forked from LBRYCommunity/lbry-sdk
race condition where the request is sent and connection lost right after
This commit is contained in:
parent
e78e2738ef
commit
8fce374cae
1 changed files with 2 additions and 0 deletions
|
@ -473,6 +473,8 @@ class RPCSession(SessionBase):
|
|||
|
||||
async def send_request(self, method, args=()):
|
||||
"""Send an RPC request over the network."""
|
||||
if self.is_closing():
|
||||
raise CancelledError()
|
||||
message, event = self.connection.send_request(Request(method, args))
|
||||
await self._send_message(message)
|
||||
await event.wait()
|
||||
|
|
Loading…
Reference in a new issue