Server still running after calling client.stop()?
See original GitHub issueI’ve got the following code in my extension
// create language client and launch server
const pythonMain = context.asAbsolutePath(
path.join('src', 'server', 'main.py')
);
const args = [pythonMain];
// Add debug options here if needed
const serverOptions: ServerOptions = { command: pythonInterpreter, args };
const clientOptions: LanguageClientOptions = {
documentSelector: [
{ scheme: "file", language: "antimony" },
],
};
// Create the language client and start the client.
client = new LanguageClient(
'AntimonyLanguage',
'Antimony Language Server',
serverOptions,
clientOptions
);
// Start the client. This will also launch the server
const clientDisposable = client.start();
context.subscriptions.push(clientDisposable);
and
export function deactivate(): Thenable<void> | undefined {
if (!client) {
return undefined;
}
// shut down the language client
return client.stop();
}
I’ve noticed that when I run my extension in debugging mode, even after I quit the extension I can still see the python process in my task manager, and if I run my extension 10 times, there will be 10 processes. Am I doing anything wrong?
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Why the server stops running when I close the Client?
This means that after your client socket is accepted, it will exit because there is no flow control element that will have it...
Read more >What does client.stop() do and how does if(client) work from ...
When the server code is finished sending packets, it should call client.stop() to send the disconnect message. You must empty the client socket ......
Read more >Services overview | Android Developers
A Service is an application component that can perform long-running operations in the background. It does not provide a user interface.
Read more >Understanding and Handling Connection Lifetime Events in ...
If the client calls the Stop method, a stop message is sent to the server, and both client and server end the SignalR...
Read more >Paho Python MQTT Client-Understanding The Loop
To stop the loop use the loop_stop() method. The loop_forever() method blocks the program, and is useful when the program must run ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@vain0x this got already addressed in the latest next versions of the library:
Server: 8.0.0-next.5 and client: 8.0.0-next.7
@mastevb will close the issue. Please ping if you have additional information.