-
Notifications
You must be signed in to change notification settings - Fork 76
Fixes concurrency issue in ProxyEngine, ConcolFormatter, and MockResponsePlugin #1161 #1162
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
Fixes concurrency issue in ProxyEngine, ConcolFormatter, and MockResponsePlugin #1161 #1162
Conversation
@dotnet-policy-service agree |
Cool! We'll check it out asap! Thank you for such a quick turnaround and your contribution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR addresses a concurrency issue by replacing standard dictionaries with thread-safe ConcurrentDictionary instances across multiple components. Key changes include updating the storage for plugin data in ProxyEngine, modifying the request log buffering in ProxyConsoleFormatter, and fixing update logic in MockResponsePlugin.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
dev-proxy/ProxyEngine.cs | Replaces Dictionary with ConcurrentDictionary and adds error handling |
dev-proxy/Logging/ProxyConsoleFormatter.cs | Updates Dictionary to ConcurrentDictionary and uses GetOrAdd |
dev-proxy-plugins/Mocks/MockResponsePlugin.cs | Changes Dictionary to ConcurrentDictionary and leverages AddOrUpdate |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works like a charm! Thank you!
Here is a suggestion to fix #1161