fix: 修复 send_command 中发送失败时的 Future 泄露 (BUG-005)

This commit is contained in:
2026-05-11 18:09:53 +08:00
parent 9ed54599f7
commit a0b4825031

View File

@@ -489,6 +489,7 @@ class WebSocketHub:
try:
# 发送命令
success = await self.send_to_device(device_id, command)
self.pending_commands.pop(command_id, None)
if not success:
return {"code": 503, "message": "发送失败"}