diff --git a/vscode-trace-common/src/client/tsp-client-provider-impl.ts b/vscode-trace-common/src/client/tsp-client-provider-impl.ts index 9c0f837..04105a8 100644 --- a/vscode-trace-common/src/client/tsp-client-provider-impl.ts +++ b/vscode-trace-common/src/client/tsp-client-provider-impl.ts @@ -20,11 +20,12 @@ export class TspClientProvider implements ITspClientProvider { RestClient.addConnectionStatusListener(status => { // Ignore the first update that is sent when calling addConnectionStatusListener - if (this._initialized) { - this._signalHandler?.notifyConnection(status); + if (!this._initialized) { + this._initialized = true; + return; } + this._signalHandler?.notifyConnection(status); }); - this._initialized = true; this._tspClient.checkHealth(); // When this is called in the remote use-case, it will block the port-forwarding service-worker. } diff --git a/vscode-trace-extension/src/extension.ts b/vscode-trace-extension/src/extension.ts index 6b93491..c059871 100644 --- a/vscode-trace-extension/src/extension.ts +++ b/vscode-trace-extension/src/extension.ts @@ -106,6 +106,9 @@ export function activate(context: vscode.ExtensionContext): ExternalAPI { // Signal the change to all trace panels TraceViewerPanel.updateTraceServerUrl(newTspClientURL); + + // Refresh so that either trace explorer or welcome page is rendered + vscode.commands.executeCommand('trace-explorer.refreshContext'); } }) );