Skip to content

Conversation

PederHP
Copy link
Collaborator

@PederHP PederHP commented Aug 5, 2025

Motivation and Context

This is an old todo. Resource subscription is now supported and the handler is registered in the same file.

How Has This Been Tested?

Not yet, soon.

Breaking Changes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@PederHP PederHP requested a review from halter73 August 5, 2025 19:29
@PederHP
Copy link
Collaborator Author

PederHP commented Aug 5, 2025

This should fix #656 I believe.

@PederHP PederHP marked this pull request as draft August 5, 2025 19:35
@PederHP PederHP changed the title Resource subscription is now supported Resource subscribe should be true if handler provided Aug 5, 2025
@PederHP PederHP marked this pull request as ready for review August 5, 2025 19:46
resourcesCapability.Subscribe = true;
}
if (SubscribeToResourcesHandler is not null || UnsubscribeFromResourcesHandler is not null)
{
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this will fix the deref of a possibly null reference:

Suggested change
{
{
resourcesCapability ??= new();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants