File tree Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,10 @@ export function activate(context: vscode.ExtensionContext) {
2323
2424export async function deactivate ( ) {
2525 // Do our best to log out of all sessions
26+
27+ const promises : Promise < any > [ ] = [ ] ;
2628 for ( const serverSession of serverSessions ) {
27- await logout ( serverSession [ 1 ] . serverName ) ;
29+ promises . push ( logout ( serverSession [ 1 ] . serverName ) ) ;
2830 }
31+ await Promise . allSettled ( promises ) ;
2932}
Original file line number Diff line number Diff line change 33import * as vscode from "vscode" ;
44import { ServerManagerView } from "./ui/serverManagerView" ;
55import { commonActivate } from "./commonActivate" ;
6+ import { logout , serverSessions } from "./makeRESTRequest" ;
67
78export function activate ( context : vscode . ExtensionContext ) {
8- const view = new ServerManagerView ( context ) ;
9+ const view = new ServerManagerView ( context ) ;
910
10- // Common activation steps
11- return commonActivate ( context , view ) ;
11+ // Common activation steps
12+ return commonActivate ( context , view ) ;
1213}
1314
14- export function deactivate ( ) { }
15+ export async function deactivate ( ) {
16+ // Do our best to log out of all sessions
17+
18+ const promises : Promise < any > [ ] = [ ] ;
19+ for ( const serverSession of serverSessions ) {
20+ promises . push ( logout ( serverSession [ 1 ] . serverName ) ) ;
21+ }
22+ await Promise . allSettled ( promises ) ;
23+ }
You can’t perform that action at this time.
0 commit comments