From 9bf9352bfc5a76a69879a1c4d821216ea823c629 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Thu, 2 Nov 2023 06:15:17 +0100 Subject: [PATCH] fix: Check for empty messages before checking its properties in MuxRPCAPI --- ssb/muxrpc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ssb/muxrpc.py b/ssb/muxrpc.py index 57f3d04..eefd934 100644 --- a/ssb/muxrpc.py +++ b/ssb/muxrpc.py @@ -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))