Make active/pending ssh-shell tasks keep a connection active

pull/208/head
Kelvin Schoofs 4 years ago
parent deb4de03be
commit cc8561d29f

@ -299,11 +299,16 @@ export class Manager implements vscode.TreeDataProvider<string | FileSystemConfi
'ssh', 'ssh',
new vscode.CustomExecution(async () => { new vscode.CustomExecution(async () => {
const connection = await this.createConnection(host); const connection = await this.createConnection(host);
return createTaskTerminal({ connection.pendingUserCount++;
const psy = await createTaskTerminal({
command, command,
client: connection.client, client: connection.client,
config: connection.actualConfig, config: connection.actualConfig,
}) });
connection.pendingUserCount--;
connection.terminals.push(psy);
psy.onDidClose(() => connection.terminals = connection.terminals.filter(t => t !== psy));
return psy;
}) })
) )
} }

Loading…
Cancel
Save