Skip to content

[WEJBHTTP-161] Fix END_STREAM not sent over HTTP/2 when request body fills exactly one buffer - #337

Merged
ropalka merged 1 commit into
wildfly:mainfrom
ropalka:WEJBHTTP-161
Oct 8, 2026
Merged

ropalka merged 1 commit into
wildfly:mainfrom
ropalka:WEJBHTTP-161

Conversation

@ropalka

@ropalka ropalka commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

https://redhat.atlassian.net/browse/WEJBHTTP-161

In WildflyClientOutputStream.handleEvent, suspendWrites() and FLAG_WRITING were cleared before the final flush() was attempted. If flush returned false (deferred, normal under HTTP/2 with concurrent requests on a shared connection), the retry mechanism was already disabled and the stream was silently abandoned, causing the server to never receive END_STREAM and stall until timeout.

Defer suspendWrites() and clearing FLAG_WRITING until after a successful flush. If flush returns false, return early keeping write callbacks active so the listener retries when the channel becomes writable. This mirrors the handling in the neighboring empty-buffer branch corrected in WEJBHTTP-45.

…fills exactly one buffer

In WildflyClientOutputStream.handleEvent, suspendWrites() and FLAG_WRITING
were cleared before the final flush() was attempted. If flush returned false
(deferred, normal under HTTP/2 with concurrent requests on a shared connection),
the retry mechanism was already disabled and the stream was silently abandoned,
causing the server to never receive END_STREAM and stall until timeout.

Defer suspendWrites() and clearing FLAG_WRITING until after a successful flush.
If flush returns false, return early keeping write callbacks active so the
listener retries when the channel becomes writable. This mirrors the handling
in the neighboring empty-buffer branch corrected in WEJBHTTP-45.
@ropalka
ropalka requested a review from fl4via as a code owner October 7, 2026 19:14
@ropalka
ropalka merged commit 95519a4 into wildfly:main Oct 8, 2026
12 checks passed
@ropalka

ropalka commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks @tadamski !

@ropalka
ropalka deleted the WEJBHTTP-161 branch October 8, 2026 09:58
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