fix: Check for empty messages before checking its properties in MuxRPCAPI
This commit is contained in:
parent
3aa2794b92
commit
9bf9352bfc
@ -138,10 +138,11 @@ class MuxRPCAPI:
|
|||||||
|
|
||||||
async def __await__(self):
|
async def __await__(self):
|
||||||
async for req_message in self.connection:
|
async for req_message in self.connection:
|
||||||
body = req_message.body
|
|
||||||
if req_message is None:
|
if req_message is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
body = req_message.body
|
||||||
|
|
||||||
if isinstance(body, dict) and body.get("name"):
|
if isinstance(body, dict) and body.get("name"):
|
||||||
self.process(self.connection, MuxRPCRequest.from_message(req_message))
|
self.process(self.connection, MuxRPCRequest.from_message(req_message))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user