Environment
-
Extension version: 1.2.21
-
Protocol: FTPS (explicit TLS, port 21)
-
OS: Windows 11
-
Editor: Trae (VSCode-based, vscode engine ^1.75)
Steps to Reproduce
-
Connect to an FTPS server (protocol: "ftps", port 21) via .vscode/sftp.json.
-
Upload/download works fine right after connecting.
-
Leave the connection idle for a few minutes to tens of minutes.
-
Try to upload or download again.
Actual Behavior
-
All uploads/downloads fail, but the status bar / explorer still shows the connection as "connected".
-
The only workaround is manually disconnecting and reconnecting.
-
Plain FTP and SFTP do NOT have this problem — both survive idle periods correctly.
Expected Behavior
- Either the idle control connection is kept alive (NOOP), or the dead connection is detected and auto-reconnected (the
stackerftp.autoReconnect: true setting already exists but never fires for FTP/FTPS).
Root Cause Analysis (from bundled dist/extension.js 1.2.21)
Comparing the two connection classes:
-
SFTPConnection attaches listeners to the ssh2 client (close / end / error), sets _connected = false and emits "disconnected" on drop — which triggers ConnectionManager.scheduleReconnect() (autoReconnect defaults to true). That's why SFTP works.
-
FTPConnection sets _connected = true in connect() and never attaches any listener to the control socket (client.ftp.socket), and **never emits "disconnected"
Environment
Extension version: 1.2.21
Protocol: FTPS (explicit TLS, port 21)
OS: Windows 11
Editor: Trae (VSCode-based,
vscodeengine ^1.75)Steps to Reproduce
Connect to an FTPS server (
protocol: "ftps", port 21) via.vscode/sftp.json.Upload/download works fine right after connecting.
Leave the connection idle for a few minutes to tens of minutes.
Try to upload or download again.
Actual Behavior
All uploads/downloads fail, but the status bar / explorer still shows the connection as "connected".
The only workaround is manually disconnecting and reconnecting.
Plain FTP and SFTP do NOT have this problem — both survive idle periods correctly.
Expected Behavior
stackerftp.autoReconnect: truesetting already exists but never fires for FTP/FTPS).Root Cause Analysis (from bundled
dist/extension.js1.2.21)Comparing the two connection classes:
SFTPConnectionattaches listeners to the ssh2 client (close/end/error), sets_connected = falseand emits"disconnected"on drop — which triggersConnectionManager.scheduleReconnect()(autoReconnect defaults totrue). That's why SFTP works.FTPConnectionsets_connected = trueinconnect()and never attaches any listener to the control socket (client.ftp.socket), and **never emits"disconnected"