[AMQ-9569][#1882] SSL handshake write timeout enforcement#1883
Merged
cshannon merged 2 commits intoapache:mainfrom Apr 9, 2026
Merged
[AMQ-9569][#1882] SSL handshake write timeout enforcement#1883cshannon merged 2 commits intoapache:mainfrom
cshannon merged 2 commits intoapache:mainfrom
Conversation
…ces the bug: it blocks for 20+ seconds proving WriteTimeoutFilter.start() does not enforce soWriteTimeout.
…te/deRegisterWrite around super.start() Adding a null check in the TimeoutThread is required to avoid random NPE if the TimeoutThread kicks in after the registerWrite but before initializeStreams() is called resulting in a NPE because TcpTransport.buffOut is null.
cshannon
approved these changes
Apr 9, 2026
Contributor
cshannon
left a comment
There was a problem hiding this comment.
LGTM, nice fix and test!
The null check was a good catch as well, I was thinking through if we would ever get to a point where the streams are never initialized due to an error leading to the deregistration never happening, but that should not happen because any exception during start will trigger a close of the socket as well (i tested this)
cshannon
pushed a commit
to cshannon/activemq
that referenced
this pull request
Apr 9, 2026
…he#1883) * feat(AMQ-9559)/feat(apache#1882): The failover test correctly reproduces the bug: it blocks for 20+ seconds proving WriteTimeoutFilter.start() does not enforce soWriteTimeout. * feat(AMQ-9559)/feat(apache#1882): Similar to oneway() add registerWrite/deRegisterWrite around super.start() Adding a null check in the TimeoutThread is required to avoid random NPE if the TimeoutThread kicks in after the registerWrite but before initializeStreams() is called resulting in a NPE because TcpTransport.buffOut is null. (cherry picked from commit 2fee158)
cshannon
pushed a commit
to cshannon/activemq
that referenced
this pull request
Apr 9, 2026
…he#1883) * feat(AMQ-9559)/feat(apache#1882): The failover test correctly reproduces the bug: it blocks for 20+ seconds proving WriteTimeoutFilter.start() does not enforce soWriteTimeout. * feat(AMQ-9559)/feat(apache#1882): Similar to oneway() add registerWrite/deRegisterWrite around super.start() Adding a null check in the TimeoutThread is required to avoid random NPE if the TimeoutThread kicks in after the registerWrite but before initializeStreams() is called resulting in a NPE because TcpTransport.buffOut is null. (cherry picked from commit 2fee158)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1882