feat: 新增异常报错处理

master
JimZhang 4 months ago
parent cf623ebab5
commit 8f3f9f05fd

@ -190,11 +190,13 @@ class Client:
) if isinstance(frame.payload, str) else frame.payload) ) if isinstance(frame.payload, str) else frame.payload)
await self.writer.drain() await self.writer.drain()
return o return o
except: except Exception as e:
try: try:
del self.frames[frame_id] del self.frames[frame_id]
except KeyError: except KeyError:
pass pass
except:
logger.opt(exception=e).error('frame_id not assignment')
raise raise
def subscribe(self, topics): def subscribe(self, topics):

Loading…
Cancel
Save