mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-26 04:39:53 +01:00
如果已经配置了auth_key,则不使用uuid生成; 适配单模块启动,防止每次服务重启设备都无法连接问题
This commit is contained in:
parent
e5e9f2bdea
commit
9194ffa6b7
1 changed files with 3 additions and 2 deletions
|
|
@ -51,8 +51,9 @@ async def main():
|
||||||
# auth_key用于jwt认证,比如视觉分析接口的jwt认证
|
# auth_key用于jwt认证,比如视觉分析接口的jwt认证
|
||||||
auth_key = config.get("manager-api", {}).get("secret", "")
|
auth_key = config.get("manager-api", {}).get("secret", "")
|
||||||
if not auth_key or len(auth_key) == 0 or "你" in auth_key:
|
if not auth_key or len(auth_key) == 0 or "你" in auth_key:
|
||||||
auth_key = str(uuid.uuid4().hex)
|
if not config["server"]["auth_key"]:
|
||||||
config["server"]["auth_key"] = auth_key
|
auth_key = str(uuid.uuid4().hex)
|
||||||
|
config["server"]["auth_key"] = auth_key
|
||||||
|
|
||||||
# 添加 stdin 监控任务
|
# 添加 stdin 监控任务
|
||||||
stdin_task = asyncio.create_task(monitor_stdin())
|
stdin_task = asyncio.create_task(monitor_stdin())
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue