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

@@ -305,6 +305,16 @@ describe('server -> client', function()
eq(clientpid, fn.getpid())
eq('howdy!', api.nvim_get_current_line())
-- sending notification and then closing channel immediately still works
n.exec_lua(function()
vim.rpcnotify(id, 'nvim_set_current_line', 'bye!')
vim.fn.chanclose(id)
end)
set_session(server)
eq(serverpid, fn.getpid())
eq('bye!', api.nvim_get_current_line())
server:close()
client:close()
end