-
Notifications
You must be signed in to change notification settings - Fork 761
[bug] clean up resources during unhandled rejections from inside stream transforms #1207
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
[bug] clean up resources during unhandled rejections from inside stream transforms #1207
Conversation
…nsform generator function
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.
This PR adds important error handling and resource cleanup to prevent resource leaks during stream processing. The changes look good overall, but I have one suggestion to improve the error handling.
DescriptionSummary By MatterAI
🔄 What ChangedThis Pull Request introduces 🔍 Impact of the ChangeThe primary impact is improved resource management and robustness. By wrapping the stream iteration in a 📁 Total Files Changed1 file was changed: 🧪 Test AddedManual testing was performed by intentionally modifying code inside a stream transform to throw an error, verifying that the 🔒Security VulnerabilitiesNo new security vulnerabilities were detected in this patch. The changes improve the stability and resource management of the application. MotivationThis PR fixes issue #1206, which addresses the problem of resources not being properly cleaned up (specifically, the stream writer not being closed) when unhandled rejections occur from within stream transforms. Type of Change
How Has This Been Tested?
Screenshots (if applicable)N/A Checklist
Related IssuesTip Quality Recommendations
Sequence DiagramsequenceDiagram
|
Important PR Review SkippedPR review skipped as per the configuration setting. Run a manually review by commenting /matter review 💡Tips to use Matter AICommand List
|
this fixes #1206
to test, I simply modified the code inside a stream transform to throw an error