Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions lua/remote-nvim/providers/provider.lua
Original file line number Diff line number Diff line change
Expand Up @@ -809,8 +809,10 @@ function Provider:_wait_for_server_to_be_ready()
-- This is synchronous but that's fine because the command we are running should immediately return
local res = vim.fn.system(cmd)
if res == "" then
timer:stop()
timer:close()
if not timer:is_closing() then
timer:stop()
timer:close()
end
if co ~= nil and coroutine.status(co) == "suspended" then
coroutine.resume(co)
end
Expand All @@ -825,8 +827,10 @@ function Provider:_wait_for_server_to_be_ready()
-- Start the timer
timer:start(timeout, 0, function()
vim.notify(("Server did not come up on local in %s ms. Try again :("):format(timeout), vim.log.levels.ERROR)
timer:stop()
timer:close()
if not timer:is_closing() then
timer:stop()
timer:close()
end
error(("Server did not come up on local in %s ms. Try again :("):format(timeout))
end)
probe_server_readiness()
Expand Down