Merge pull request #36393 from zeertzjq/rstream-close-cb

fix(channel): closing socket with pending writes leaks memory
This commit is contained in:
zeertzjq
2025-10-31 09:14:19 +08:00
committed by GitHub
parent 5ddabbeba4
commit accd392f4d
8 changed files with 46 additions and 29 deletions

View File

@@ -282,6 +282,19 @@ describe('--embed UI', function()
end,
}
end)
it('closing stdio with another remote UI does not leak memory #36392', function()
t.skip(t.is_os('win')) -- n.connect() hangs on Windows
clear({ args_rm = { '--headless' } })
Screen.new()
eq(1, #api.nvim_list_uis())
local server = api.nvim_get_vvar('servername')
local other_session = n.connect(server)
Screen.new(nil, nil, nil, other_session)
eq(2, #api.nvim_list_uis())
check_close()
other_session:close()
end)
end)
describe('--embed --listen UI', function()