Skip to content

refactor: correct loop syntax for synchronous iterations #787

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jbpionnier
Copy link

  • Replace for-await-of with for-of in synchronous contexts
  • Affects server cleanup, event processing, and test iterations
  • No functional changes, just proper async/sync usage

Motivation and Context

This change fixes incorrect usage of for await...of loops in synchronous contexts throughout the codebase.

How Has This Been Tested?

  • All existing tests continue to pass
  • The functionality remains identical as these changes only correct syntax without altering behavior
  • Verified that server cleanup, event processing, and test iterations work as expected

Breaking Changes

None. This is purely a syntax correction with no functional 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

The changes affect the following areas:

  • Server shutdown procedures in example servers
  • Event processing in InMemoryEventStore
  • Test iterations in middleware tests
  • Resource template processing in McpServer

- Replace for-await-of with for-of in synchronous contexts
- Affects server cleanup, event processing, and test iterations
- No functional changes, just proper async/sync usage
@jbpionnier jbpionnier requested review from a team as code owners July 19, 2025 12:57
@jbpionnier jbpionnier requested review from ochafik and ihrpr July 19, 2025 12:57
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.

1 participant