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