Skip to content

Commit

Permalink
Reset the lsp _shutdown flag when starting the LSP server.
Browse files Browse the repository at this point in the history
  • Loading branch information
dfalbel committed Oct 20, 2024
1 parent 0c756ff commit 6c611cd
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@ def start(self, lsp_host: str, lsp_port: int, shell: "PositronShell", comm: Base
# Give the LSP server access to the kernel to enhance completions with live variables
self.shell = shell

# If self.lsp has been used previously in this process and sucessfully exited, it will be
# marked with a shutdown flag, which makes it ignore all messages.
# We reset it here, so we allow the server to start again.
self.lsp._shutdown = False

if self._server_thread is not None:
logger.warning("LSP server thread was not properly shutdown")
return
Expand Down

0 comments on commit 6c611cd

Please sign in to comment.