Small changes
This commit is contained in:
@@ -176,6 +176,13 @@ async function send<T>(
|
||||
Public API
|
||||
────────────────────────── */
|
||||
|
||||
export async function closeClient() {
|
||||
if (!socket) return;
|
||||
socket.close();
|
||||
socket = null;
|
||||
connecting = null;
|
||||
}
|
||||
|
||||
export async function addRun(
|
||||
useLocalhost: boolean,
|
||||
problem: string,
|
||||
|
||||
@@ -4,6 +4,7 @@ import { startServer, stopServer } from "./server";
|
||||
import os from "os";
|
||||
import { exec } from "child_process";
|
||||
import net from "net";
|
||||
import { closeClient } from "./client";
|
||||
|
||||
var globalStatusBarItem: vscode.StatusBarItem | undefined;
|
||||
|
||||
@@ -105,6 +106,7 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
|
||||
export function deactivate() {
|
||||
stopServer(globalStatusBarItem as any);
|
||||
closeClient();
|
||||
}
|
||||
|
||||
export function canConnect(
|
||||
|
||||
+1
-1
@@ -129,7 +129,7 @@ export function startMonitoring(useLocalhost: boolean, runId: string) {
|
||||
moveId: moveId++,
|
||||
changes: {
|
||||
from: 0,
|
||||
to: serverText.length,
|
||||
to: serverText?.length || 0,
|
||||
insert: editorText,
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user