zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
50.46k stars 3.12k forks source link

SSH connection to a remote server "can't keep up" with network conditions #20375

Open Moshyfawn opened 2 weeks ago

Moshyfawn commented 2 weeks ago

Check for existing issues

Describe the bug / provide steps to reproduce it

Prerequisites

Open a remote project in Zed on a server that requires a VPN connection to access. The VPN connection is established on the client machine, not the server.

Description

After waking up the client machine from sleep, the SSH connection to the remote server still shows as "connected" even though the VPN connection has been terminated. When the VPN connection is re-established, the SSH connection does not automatically reconnect. After a while it shows as "pending" before timing out and displaying "disconnected".

Environment

Zed: v0.162.0 (Zed Nightly 083f06322d10b0187da39ab1de0fe0ca4e4f94cd) OS: macOS 14.6.1 Memory: 18 GiB Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

Zed.log ``` ```
ConradIrwin commented 1 week ago

@Moshyfawn ugh, that sounds unpleasant.

So the problem here is:

Is that the case? Does clicking "Reconnect" in Zed fix it in that situation?

Moshyfawn commented 6 days ago

Is that the case? Does clicking "Reconnect" in Zed fix it in that situation?

It's a little different:

  1. Computer enters sleep mode, causing VPN connection to drop
  2. Upon waking computer, Zed continues showing "connected" status despite being unable to create new remote terminals or update files. Even after manually re-enabling VPN, Zed takes approximately 10 seconds to detect disconnection
  3. Once Zed detects the dropped connection (despite VPN being manually reconnected), it shows "disconnected" status and prompts to retry
  4. Using the retry option successfully restores the remote connection