mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-26 00:53:54 +08:00
fix: 退出过快问题
This commit is contained in:
@@ -92,10 +92,8 @@ async def sendAudio(conn, audios, pre_buffer=True):
|
||||
if conn.client_abort:
|
||||
break
|
||||
|
||||
# 每分钟重置一次计时器
|
||||
if time.perf_counter() - last_reset_time > 60:
|
||||
await conn.reset_timeout()
|
||||
last_reset_time = time.perf_counter()
|
||||
# 重置没有声音的状态
|
||||
conn.client_no_voice_last_time = 0.0
|
||||
|
||||
# 计算预期发送时间
|
||||
expected_time = start_time + (play_position / 1000)
|
||||
|
||||
Reference in New Issue
Block a user