mirror of
https://github.com/neovim/neovim.git
synced 2025-11-15 14:59:20 +00:00
Merge pull request #36393 from zeertzjq/rstream-close-cb
fix(channel): closing socket with pending writes leaks memory
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user