Skip to content
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

[UNDERTOW-2249] Change that HttpClientConnection.sendRequest on a clo... #1564

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xjusko
Copy link

@xjusko xjusko commented Mar 6, 2024

...sed connection results in a ClosedChannelException instead of IOException
https://issues.redhat.com/browse/UNDERTOW-2249

@xjusko
Copy link
Author

xjusko commented Mar 14, 2024

Hi @fl4via , could you please review my PR? Thanks.

Copy link
Member

@fl4via fl4via left a comment

Choose a reason for hiding this comment

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

@xjusko the ClosedChannelException is not always appropriate, as if you look at the usages of UndertowClientMessages.invalidConnectionState, it is thrown not only when the connection is closed or close is requested, but also on upgrade scenarios.
That being said, I see the point you raised and I think the ticket is valid. So, my suggestion here is to add another message just for closed connections, that message would throw the ClosedChannelException. Then, at the usage points, you would have two checks: one for upgrades, that uses the ld IOException invalidConnectionState, and the other one for close states, and this one would use your new message and throw the ClosedChannelException.

@fl4via fl4via added enhancement Enhances existing behaviour or code waiting PR update Awaiting PR update(s) from contributor before merging labels Mar 15, 2024
…sed connection results in a ClosedChannelException instead of IOException
@xjusko
Copy link
Author

xjusko commented Mar 15, 2024

Thanks for the review @fl4via , it should be fixed based on your suggestion.

@baranowb baranowb added under verification Currently being verified (running tests, reviewing) before posting a review to contributor waiting peer review PRs that edit core classes might require an extra review and removed waiting PR update Awaiting PR update(s) from contributor before merging labels Mar 21, 2024
@xjusko
Copy link
Author

xjusko commented Mar 21, 2024

@fl4via I see that CI failed, but I don't think that my changes have any implications on the test that failed.

@baranowb baranowb added the waiting CI check Ready to be merged but waiting for CI check label Apr 3, 2024
@baranowb
Copy link
Contributor

baranowb commented Apr 3, 2024

@xjusko ^^

@xjusko xjusko requested a review from fl4via April 11, 2024 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhances existing behaviour or code under verification Currently being verified (running tests, reviewing) before posting a review to contributor waiting CI check Ready to be merged but waiting for CI check waiting peer review PRs that edit core classes might require an extra review
Projects
None yet
3 participants