# Pastebin 8WsiKKa3 -- When the loop exits, close all unclosed uv handles (flushing any streams found). uv.walk(function (handle) if handle then local function close() if not handle:is_closing() then handle:close() end end if handle.shutdown then handle:shutdown(close) else close() end end end) uv.run()