From cc8561d29f1fd5ced4e53401a647a0346b4a015f Mon Sep 17 00:00:00 2001 From: Kelvin Schoofs Date: Wed, 8 Jul 2020 18:02:16 +0200 Subject: [PATCH] Make active/pending ssh-shell tasks keep a connection active --- src/manager.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/manager.ts b/src/manager.ts index e2a7123..6b3b529 100644 --- a/src/manager.ts +++ b/src/manager.ts @@ -299,11 +299,16 @@ export class Manager implements vscode.TreeDataProvider { const connection = await this.createConnection(host); - return createTaskTerminal({ + connection.pendingUserCount++; + const psy = await createTaskTerminal({ command, client: connection.client, config: connection.actualConfig, - }) + }); + connection.pendingUserCount--; + connection.terminals.push(psy); + psy.onDidClose(() => connection.terminals = connection.terminals.filter(t => t !== psy)); + return psy; }) ) }