fix(health.lua): increased version check cmd timeout (#3601)
Some checks failed
docgen / docgen (push) Has been cancelled

Problem:
LspInfo returns '?' for version string when using the codeqlls
language server. This is because codeql is slow to return its
version number due to the underlying JVM.

Solution:
Increase the timeout from 300ms to 500ms.
1000 iterations of `codeql version` resulted in (349 +- 13) ms
which informed the choice of 500ms.
This commit is contained in:
snowdroppe 2025-02-04 01:43:07 +00:00 committed by GitHub
parent 00b236b795
commit 66bc018936
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -51,7 +51,7 @@ local function try_get_cmd_output(cmd)
on_stdout = on_data,
on_stderr = on_data,
})
local rv = vim.fn.jobwait({ chanid }, 300)
local rv = vim.fn.jobwait({ chanid }, 500)
vim.fn.jobstop(chanid)
return rv[1] == 0 and out or nil
end