Refactor PushClient to improve robustness and error handling#3
Open
nglmercer wants to merge 2 commits intoRustLangES:mainfrom
Open
Refactor PushClient to improve robustness and error handling#3nglmercer wants to merge 2 commits intoRustLangES:mainfrom
nglmercer wants to merge 2 commits intoRustLangES:mainfrom
Conversation
The client state handling and network tasks have been significantly refactored to prevent resource deadlocks and unbounded memory growth. This includes proper buffering of media before publication, graceful shutdown procedures, and enhanced logging for connection status. Key changes: - Added bounded media buffers with LRU eviction for video/audio frames to prevent memory leaks - Implemented structured background tasks for TCP reading/writing with proper cancellation - Added sequence header caching and pre-publication buffering to ensure stream continuity - Enhanced RTMP event handling to detect connection failures and reject streams appropriately - Improved logging for connection status, errors, and shutdown events - Simplified TLS connection setup and error propagation
Member
|
i feel that this code is ai-generated but i cant prove it |
Juanperias
requested changes
Jan 19, 2026
Member
Juanperias
left a comment
There was a problem hiding this comment.
There are a lot of comments that simply clutter up the code and add nothing (I know these comments are made with AI).
Example:
// FIXED: Collapsed nested if let
if let Some(meta) = &state.prepublish_metadata
&& let Ok(res) = state.session.publish_metadata(meta)
{
Self::send_packet(tx, res);
}
// FIXED: Collapsed nested if let
// ...
Member
|
My opinion is no, this should not be merged! As long as the code is still riddled with AI slop. If the solution is correct, then fine, but there wasn't human intervention, which makes reviewing the PR extremely tedious, not to mention that the AI tends to break the codebase. Even so, @SergioRibera is the one managing the project, so the final decision is up to him |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The client state handling and network tasks have been significantly refactored to prevent resource deadlocks and unbounded memory growth. This includes proper buffering of media before publication, graceful shutdown procedures, and enhanced logging for connection status.
Key changes: