mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48:35 +00:00
feat(startup): validate --listen address
Problem:
`nvim --listen` does not error on EADDRINUSE. #30123
Solution:
Now that `$NVIM_LISTEN_ADDRESS` is deprecated and input *only* (instead
of the old, ambiguous situation where it was both an input *and* an
output), we can be fail fast instead of trying to "recover". This
reverts the "recovery" behavior of
704ba4151e
, but that was basically
a workaround for the fragility of `$NVIM_LISTEN_ADDRESS`.
This commit is contained in:
@@ -93,15 +93,15 @@ void remote_ui_free_all_mem(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
/// Wait until ui has connected on stdio channel if only_stdio
|
||||
/// is true, otherwise any channel.
|
||||
/// Wait until UI has connected.
|
||||
///
|
||||
/// @param only_stdio UI is expected to connect on stdio.
|
||||
void remote_ui_wait_for_attach(bool only_stdio)
|
||||
{
|
||||
if (only_stdio) {
|
||||
Channel *channel = find_channel(CHAN_STDIO);
|
||||
if (!channel) {
|
||||
// this function should only be called in --embed mode, stdio channel
|
||||
// can be assumed.
|
||||
// `only_stdio` implies --embed mode, thus stdio channel can be assumed.
|
||||
abort();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user