Skip to content

Fix fragmentation bug#147

Merged
jjeffcaii merged 1 commit intorsocket:masterfrom
echistyakov:fix-fragmentation-bug
Mar 18, 2026
Merged

Fix fragmentation bug#147
jjeffcaii merged 1 commit intorsocket:masterfrom
echistyakov:fix-fragmentation-bug

Conversation

@echistyakov
Copy link
Contributor

@echistyakov echistyakov commented Feb 12, 2026

Fix fragmentation bug in final frame

Motivation:

If the final frame of a stream is fragmented - only the last fragment should have the (C)omplete flag set.
Currently - the first fragment has the (C)omplete flag set - which is a bug - because a receiver may assume that the stream is complete even though more fragments are coming.

(F) and (C) flags are essentially mutually exclusive.

Modifications:

Ensure (C)omplete flag is unset for all fragments besides the last one (i.e. fragments with (F)ollow flag set).

Result:

The logic now handles the (C)omplete flag correctly for fragmented frames.

@echistyakov
Copy link
Contributor Author

cc @jjeffcaii

Copy link
Member

@jjeffcaii jjeffcaii left a comment

Choose a reason for hiding this comment

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

LGTM

@jjeffcaii jjeffcaii merged commit 63b1066 into rsocket:master Mar 18, 2026
1 of 2 checks passed
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.

2 participants