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

[REM3-413] Properly treat the scenario where a connection is pre auth… #304

Merged
merged 1 commit into from
Jun 14, 2024

Conversation

fl4via
Copy link
Contributor

@fl4via fl4via commented Jun 9, 2024

… closed.

See RemoteConnection.handlePreAuthCloseRequest to fully understand the code path. The remote connection write listener needs to have shutdown writes invoked to be aware that the channel is closed, or else there is no linkage between the connection and the XNIO channels layer when the channel is closed at ServerConnectionOpenListener.Initial listener. To complete the fix, the very same remote connection write listener needs to skip the write attempt if the channel is closed, which will prevent an uneeded ClosedChannelException.

If wondering when this bug is hit, notice that the write listener can be invoked after the read listener has read -1 during the execution of XNIO NioSocketConduit.handleReady, as a result of a wake up operations call.

Jira: https://issues.redhat.com/browse/REM3-413

5.0 PR: #305

… closed.

See RemoteConnection.handlePreAuthCloseRequest to fully understand the code path. The remote connection write listener needs to have shutdown writes invoked to be aware that the channel is closed, or else there is no linkage between the connection and the XNIO channels layer when the channel is closed at ServerConnectionOpenListener.Initial listener. To complete the fix, the very same remote connection write listener needs to skip the write attempt if the channel is closed, which will prevent an uneeded ClosedChannelException.

If wondering when this bug is hit, notice that the write listener can be invoked after the read listener has read -1 during the execution of XNIO NioSocketConduit.handleReady, as a result of a wake up operations call.

Signed-off-by: Flavia Rainone <frainone@redhat.com>
@fl4via fl4via merged commit 7eea554 into jboss-remoting:5.1 Jun 14, 2024
23 of 25 checks passed
@fl4via fl4via deleted the REM3-413_5.1 branch June 14, 2024 08:56
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.

None yet

1 participant