Skip to content

Pin the read count on both autoRead paths - #2304

Merged
hyperxpro merged 1 commit into
mainfrom
test/autoread-read-count
Aug 5, 2026
Merged

Pin the read count on both autoRead paths#2304
hyperxpro merged 1 commit into
mainfrom
test/autoread-read-count

Conversation

@hyperxpro

Copy link
Copy Markdown
Member

Motivation:

#2302 stopped AsyncHttpClientHandler requesting a read that Netty's HeadContext already drives when autoRead is on.
Nothing in the suite catches that duplicate coming back, since the connection works correctly either way

Modification:

Add AsyncHttpClientHandlerReadTest, an EmbeddedChannel test that counts reads at an outbound handler placed in front of the handler under test, so it sees both entry points.
Covers channelActive and channelReadComplete with autoRead on, and channelReadComplete with it off.

Result:

One read per cycle with autoRead on, reads still driven with it off; without #2302 the count is 2.

@hyperxpro
hyperxpro merged commit bd09dcf into main Aug 5, 2026
17 checks passed
@hyperxpro
hyperxpro deleted the test/autoread-read-count branch August 5, 2026 19:30
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.

1 participant