fix: 修复 send_command 中发送失败时的 Future 泄露 (BUG-005)
This commit is contained in:
@@ -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": "发送失败"}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user