mirror of
https://github.com/neovim/neovim.git
synced 2025-09-05 19:08:15 +00:00
fix(remote): don't leak memory on failure to connect to server (#21931)
Also fix the race between output and resize in the test for this.
This commit is contained in:
@@ -885,7 +885,7 @@ static void remote_request(mparm_T *params, int remote_args, char *server_addr,
|
||||
os_errmsg("Remote ui failed to start: ");
|
||||
os_errmsg(connect_error);
|
||||
os_errmsg("\n");
|
||||
exit(1);
|
||||
os_exit(1);
|
||||
}
|
||||
|
||||
ui_client_channel_id = chan;
|
||||
|
@@ -2410,9 +2410,7 @@ describe("TUI as a client", function()
|
||||
clear()
|
||||
local screen = thelpers.screen_setup(0,
|
||||
string.format([=[["%s", "-u", "NONE", "-i", "NONE", "--server", "127.0.0.1:2436546", "--remote-ui"]]=],
|
||||
nvim_prog))
|
||||
|
||||
screen:try_resize(60, 7)
|
||||
nvim_prog), 60)
|
||||
|
||||
screen:expect([[
|
||||
Remote ui failed to start: {MATCH:.*}|
|
||||
|
Reference in New Issue
Block a user