Skip to content

fix(remote): increase connect timeout for slower networks #36777#36807

Merged
github-actions[bot] merged 1 commit intorelease-0.11from
backport-36800-to-release-0.11
Dec 2, 2025
Merged

fix(remote): increase connect timeout for slower networks #36777#36807
github-actions[bot] merged 1 commit intorelease-0.11from
backport-36800-to-release-0.11

Conversation

@neovim-backports
Copy link

Description

Backport of #36800 to release-0.11.

Problem:
Connecting to a remote Neovim fails on slow network:

```
$ nvim --remote-ui --server 10.0.3.100:11111
Remote ui failed to start: connection refused
```

Strace reveals that the connection wasn't actually refused, but was still in progress:
```
15:52:50.678223 socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 11
15:52:50.678278 setsockopt(11, SOL_TCP, TCP_NODELAY, [1], 4) = 0
15:52:50.678320 connect(11, {sa_family=AF_INET, sin_port=htons(11111), sin_addr=inet_addr("10.0.3.100")}, 16) = -1 EINPROGRESS (Дія зараз виконується)
15:52:50.678443 clock_gettime(CLOCK_MONOTONIC, {tv_sec=21736, tv_nsec=57625406}) = 0
15:52:50.678489 io_uring_enter(4, 3, 3, IORING_ENTER_GETEVENTS, NULL, 0) = 3
15:52:50.678544 epoll_pwait(3, [], 1024, 50, NULL, 8) = 0
15:52:50.728911 clock_gettime(CLOCK_MONOTONIC, {tv_sec=21736, tv_nsec=108159596}) = 0
15:52:50.729203 epoll_ctl(3, EPOLL_CTL_DEL, 11, 0x7ffd6ec9a3bc) = 0
15:52:50.729527 close(11)               = 0
```

Solution:
Increase hardcoded timeout from 50ms to 500ms.

(cherry picked from commit a141fd2)
@github-actions github-actions bot enabled auto-merge (rebase) December 2, 2025 16:18
@github-actions github-actions bot added remote remote UI, --remote commands, p2p / peer-to-peer target:release labels Dec 2, 2025
@github-actions github-actions bot merged commit 5ca2eb5 into release-0.11 Dec 2, 2025
31 checks passed
@github-actions github-actions bot deleted the backport-36800-to-release-0.11 branch December 2, 2025 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

remote remote UI, --remote commands, p2p / peer-to-peer target:release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant