summaryrefslogtreecommitdiff
path: root/extension/src
diff options
context:
space:
mode:
Diffstat (limited to 'extension/src')
-rw-r--r--extension/src/activation/environmentSetup.ts1
-rw-r--r--extension/src/commands.ts9
-rw-r--r--extension/src/debugPanel.ts9
-rw-r--r--extension/src/util/messenger.ts6
4 files changed, 16 insertions, 9 deletions
diff --git a/extension/src/activation/environmentSetup.ts b/extension/src/activation/environmentSetup.ts
index c8e8b85f..81d58afe 100644
--- a/extension/src/activation/environmentSetup.ts
+++ b/extension/src/activation/environmentSetup.ts
@@ -249,6 +249,7 @@ export async function startContinuePythonServer() {
});
child.unref();
} catch (e: any) {
+ console.log("Error starting server:", e);
retry();
}
};
diff --git a/extension/src/commands.ts b/extension/src/commands.ts
index cf6892f2..ea12699e 100644
--- a/extension/src/commands.ts
+++ b/extension/src/commands.ts
@@ -1,17 +1,8 @@
import * as vscode from "vscode";
import * as path from "path";
import * as os from "os";
-import {
- acceptSuggestionCommand,
- rejectSuggestionCommand,
- suggestionDownCommand,
- suggestionUpCommand,
- acceptAllSuggestionsCommand,
- rejectAllSuggestionsCommand,
-} from "./suggestions";
import { acceptDiffCommand, rejectDiffCommand } from "./diffs";
-import * as bridge from "./bridge";
import { debugPanelWebview } from "./debugPanel";
import { ideProtocolClient } from "./activation/activate";
diff --git a/extension/src/debugPanel.ts b/extension/src/debugPanel.ts
index b687c3e4..d133080b 100644
--- a/extension/src/debugPanel.ts
+++ b/extension/src/debugPanel.ts
@@ -221,6 +221,15 @@ export function setupDebugPanel(
}
break;
}
+ case "websocketForwardingClose": {
+ let url = data.url;
+ let connection = websocketConnections[url];
+ if (typeof connection !== "undefined") {
+ connection.close();
+ websocketConnections[url] = undefined;
+ }
+ break;
+ }
case "websocketForwardingMessage": {
let url = data.url;
let connection = websocketConnections[url];
diff --git a/extension/src/util/messenger.ts b/extension/src/util/messenger.ts
index bcc88fe1..152d4a1f 100644
--- a/extension/src/util/messenger.ts
+++ b/extension/src/util/messenger.ts
@@ -18,6 +18,8 @@ export abstract class Messenger {
abstract onError(callback: () => void): void;
abstract sendAndReceive(messageType: string, data: any): Promise<any>;
+
+ abstract close(): void;
}
export class WebsocketMessenger extends Messenger {
@@ -160,4 +162,8 @@ export class WebsocketMessenger extends Messenger {
onError(callback: () => void): void {
this.websocket.addEventListener("error", callback);
}
+
+ close(): void {
+ this.websocket.close();
+ }
}