Skip to content

Commit 998f186

Browse files
authored
Send a disconnection message via the management connection before killing the local extension host (microsoft#157557)
Send a disconnection message via the management connection before killing the local extension host (microsoft#157269) Fixes microsoft#156690: Send a disconnection message via the management connection before killing the local extension host
1 parent 281b90d commit 998f186

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/vs/workbench/services/extensions/common/abstractExtensionService.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,12 @@ export abstract class AbstractExtensionService extends Disposable implements IEx
258258
}));
259259

260260
this._register(this._lifecycleService.onDidShutdown(() => {
261+
// We need to disconnect the management connection before killing the local extension host.
262+
// Otherwise, the local extension host might terminate the underlying tunnel before the
263+
// management connection has a chance to send its disconnection message.
264+
const connection = this._remoteAgentService.getConnection();
265+
connection?.dispose();
266+
261267
this.stopExtensionHosts();
262268
}));
263269
}

0 commit comments

Comments
 (0)