diff --git a/lua/avante/llm.lua b/lua/avante/llm.lua index c50379c..ba6dc24 100644 --- a/lua/avante/llm.lua +++ b/lua/avante/llm.lua @@ -989,7 +989,7 @@ function M._stream(opts) if retry_count <= 0 then timer:stop() - timer:close() + pcall(function() timer:close() end) Utils.info("Restarting stream after rate limit pause") M._stream(opts)