fix: Check for empty messages before checking its properties in MuxRPCAPI

This commit is contained in:
Gergely Polonkai 2023-11-02 06:15:17 +01:00
parent 3aa2794b92
commit 9bf9352bfc
No known key found for this signature in database
GPG Key ID: 2D2885533B869ED4

View File

@ -138,10 +138,11 @@ class MuxRPCAPI:
async def __await__(self):
async for req_message in self.connection:
body = req_message.body
if req_message is None:
return
body = req_message.body
if isinstance(body, dict) and body.get("name"):
self.process(self.connection, MuxRPCRequest.from_message(req_message))