diff --git a/nonebot/adapters/satori/adapter.py b/nonebot/adapters/satori/adapter.py index 353082e..125486b 100644 --- a/nonebot/adapters/satori/adapter.py +++ b/nonebot/adapters/satori/adapter.py @@ -160,7 +160,7 @@ async def _authenticate(self, info: ClientInfo, ws: WebSocket) -> Optional[Liter async def _heartbeat(self, info: ClientInfo, ws: WebSocket): """心跳""" while True: - log("TRACE", f"Heartbeat {self.sequences[info.identity]}") + log("TRACE", f"Heartbeat {self.sequences.get(info.identity, 0)}") payload = PingPayload(op=Opcode.PING, body={}) try: await ws.send(self.payload_to_json(payload))