mirror of
https://litchi.icu/ngc2207/judge.git
synced 2025-05-18 14:36:43 +00:00
fix(playground): properly stop language client when closing WebSocket connection
This commit is contained in:
parent
168facb85b
commit
58e4f1220b
@ -65,6 +65,10 @@ export default function PlaygroundPage() {
|
||||
webSocketRef.current.close();
|
||||
webSocketRef.current = null;
|
||||
}
|
||||
if (languageClientRef.current) {
|
||||
languageClientRef.current.stop();
|
||||
languageClientRef.current = null;
|
||||
}
|
||||
connectToLanguageServer(language, webSocketRef).then(
|
||||
(languageClient) => {
|
||||
languageClientRef.current = languageClient;
|
||||
|
Loading…
Reference in New Issue
Block a user