Return from ping loop if it's the only coroutine

FIXME: this is a bandaid fix to get tests working again. Most tests will have to wait through one ping loop before exiting, causing tests to take like 10 minutes.
This commit is contained in:
Ottatop 2024-03-23 00:43:29 -05:00
parent 5da0f84350
commit 535b441887

View file

@ -57,6 +57,10 @@ local client = {
client.loop:wrap(function()
while true do
-- If the only managed coroutine is this ping loop, return to allow the config to exit
if client.loop:count() == 1 then
return
end
require("cqueues").sleep(60)
local success, err, errno = client.conn:ping(10)
if not success then