Skip to content

Sync with template: Fix duplicate server handlers on concurrent restarts#442

Merged
edvilme merged 1 commit intomainfrom
sync/template-pr-259-8dca0beed998dca7
Feb 26, 2026
Merged

Sync with template: Fix duplicate server handlers on concurrent restarts#442
edvilme merged 1 commit intomainfrom
sync/template-pr-259-8dca0beed998dca7

Conversation

@edvilme
Copy link
Contributor

@edvilme edvilme commented Feb 26, 2026

  • Move _disposables cleanup outside the if(oldLsClient) block in restartServer() so disposables are always cleaned up even if the old client is undefined
  • Add try/catch around lsClient.stop() in deactivate() to prevent unhandled exceptions during extension deactivation

Source: microsoft/vscode-python-tools-extension-template#259

- Move _disposables cleanup outside the if(oldLsClient) block in restartServer()
  so disposables are always cleaned up even if the old client is undefined
- Add try/catch around lsClient.stop() in deactivate() to prevent unhandled
  exceptions during extension deactivation

Source: microsoft/vscode-python-tools-extension-template#259

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@edvilme edvilme added bug Issue identified by VS Code Team member as probable bug debt Technical debt or repo cleanup labels Feb 26, 2026
@edvilme edvilme enabled auto-merge (squash) February 26, 2026 00:25
Copy link

@rchiodo rchiodo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved via Review Center.

@edvilme edvilme merged commit 302877c into main Feb 26, 2026
23 checks passed
@edvilme edvilme deleted the sync/template-pr-259-8dca0beed998dca7 branch February 26, 2026 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue identified by VS Code Team member as probable bug debt Technical debt or repo cleanup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants