Skip to content

Commit

Permalink
Quick fix for PROCESS_CLEANUP_TEST CI failures
Browse files Browse the repository at this point in the history
The problem is that the shutdown callback is being called during loop_gc, so the Lua/Libuv state is being closed/free'd and the `handle` local var has already been closed/free'd so it's no longer a valid uv_stream_t (see luvit#414).

This will fix PROCESS_CLEANUP_TEST but there is more to do to solve the general case of 'things happening during loop gc'
  • Loading branch information
squeek502 committed Nov 3, 2019
1 parent c3c1617 commit d0fdf5c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/talking-to-children.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ local function onread(err, chunk)
end
end

local function onshutdown()
local function onshutdown(err)
if err == "ECANCELED" then
return
end
uv.close(handle, onclose)
end

Expand Down

0 comments on commit d0fdf5c

Please sign in to comment.