vscode-sshfs icon indicating copy to clipboard operation
vscode-sshfs copied to clipboard

Prompt should not repeat on escape/cancel

Open cmgrayb opened this issue 2 years ago • 1 comments

Issue Description

When using <prompt> for password on a connection, the password prompt will repeat many times and eventually hang the extension in an apparent loop if a valid entry is not provided.

This is particularly a problem for temporary connections which were left connected when closing VSCode and are no longer needed, or connections where the password is rotated and must be queried each time.

Expected Behavior

Canceling or hitting Escape should end the prompt function/routine and stop trying to connect to that profile.

Additional Info

Possibly provide a 'Reconnect on Startup' checkbox per profile to check whether the connection should be attempted or skipped until manually re-established.

cmgrayb avatar May 20 '22 18:05 cmgrayb

I'll see about adding a debounce for identical prompts.

What's happening according to me is that VS Code is requesting to open the required file(s) multiple times, which is quite common as it also tries to read .vscode/settings.json, maybe package.json or similar, etc. Pressing escape cancels the current connection attempt, but since VS Code immediately requests a new file to be read, it re-attempts and therefore reprompts.

SchoofsKelvin avatar May 27 '22 19:05 SchoofsKelvin