rafaelmaiolla / remote-vscode

A package that implements the Textmate's 'rmate' feature for Visual Studio Code.
MIT License
260 stars 33 forks source link

Error saving files after reconnecting to server #58

Open DavidA94 opened 6 years ago

DavidA94 commented 6 years ago

When working on files, if the SSH connection ever dies, then once it is reestablished, I should still be able to save files. Current behavior gives an error saying "Error saving to "

There are two ways I've hit this scenario:

  1. I'm working on files, and at the end of the day, I sleep my computer to go home. The next morning, I re-initiate the SSH connection to the server, but now I have to close and reopen all files in order for them to save.

  2. I'm working on files, and for whatever reason I need to reboot the remote machine. Once the reboot is done, and I re-initiate the SSH connection to the server, I still have to close and reopen all files in order for them to save.

rafaelmaiolla commented 6 years ago

I can say that this is not going to work. Once you lose the connection, the socket is broken and you can't save your files to the remote server.

This is a limitation. Every time the ssh connection is re-initiate, you need to close all files and open it again.

DavidA94 commented 6 years ago

Is there really no way to 1. Detect the new SSH connection and 2. "Reopen" the files so that they're savable again?

I understand that the socket is broken, but it seems like there should be a way to make it to where I don't have to close and reopen my files after the connection is reestablished.

rafaelmaiolla commented 6 years ago

The connection is done from remote to local machine, so VSCode can't reopen it.

DavidA94 commented 6 years ago

The plugin doesn't have a way to interact with the SSH session, and run the commands itself?