Skip to content

[#2398] FutureBrokerInfoTimeout is missed due to logic operator error - #2399

Merged
cshannon merged 2 commits into
apache:mainfrom
mattrpav:amq-gh-2398-futurebrokerinfotimeout
Aug 5, 2026
Merged

[#2398] FutureBrokerInfoTimeout is missed due to logic operator error#2399
cshannon merged 2 commits into
apache:mainfrom
mattrpav:amq-gh-2398-futurebrokerinfotimeout

Conversation

@mattrpav

@mattrpav mattrpav commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@mattrpav
mattrpav requested a review from cshannon August 5, 2026 20:32
…its timeout

The timed get loop's condition uses || between the not-disposed check and
the deadline check, so the loop runs until disposal regardless of the
caller's timeout. Widens FutureBrokerInfo to package-private so the test
drives the real class. Two of four scenarios fail until the condition is
corrected.
Correct the loop condition from || to && so the timed get exits when
EITHER the bridge is disposed OR the deadline expires. Previously a peer
that never delivered its BrokerInfo parked the bridge start thread until
disposal, ignoring the caller's timeout.
@mattrpav
mattrpav force-pushed the amq-gh-2398-futurebrokerinfotimeout branch from 7311a15 to a4802a7 Compare August 5, 2026 21:09

@cshannon cshannon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM assuming tests pass

@cshannon
cshannon merged commit c6f85bc into apache:main Aug 5, 2026
19 of 20 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Apache ActiveMQ v6.4.0 Aug 5, 2026
cshannon added a commit that referenced this pull request Aug 6, 2026
…#2399) (#2409)

* [#2398] Add test proving FutureBrokerInfo.get(timeout) ignores its timeout

The timed get loop's condition uses || between the not-disposed check and
the deadline check, so the loop runs until disposal regardless of the
caller's timeout. Widens FutureBrokerInfo to package-private so the test
drives the real class. Two of four scenarios fail until the condition is
corrected.

* Fix FutureBrokerInfo.get(timeout) to honor its timeout

Correct the loop condition from || to && so the timed get exits when
EITHER the bridge is disposed OR the deadline expires. Previously a peer
that never delivered its BrokerInfo parked the bridge start thread until
disposal, ignoring the caller's timeout.

(cherry picked from commit c6f85bc)

Co-authored-by: Matt Pavlovich <mattrpav@apache.org>
cshannon added a commit that referenced this pull request Aug 6, 2026
…#2399) (#2410)

* [#2398] Add test proving FutureBrokerInfo.get(timeout) ignores its timeout

The timed get loop's condition uses || between the not-disposed check and
the deadline check, so the loop runs until disposal regardless of the
caller's timeout. Widens FutureBrokerInfo to package-private so the test
drives the real class. Two of four scenarios fail until the condition is
corrected.

* Fix FutureBrokerInfo.get(timeout) to honor its timeout

Correct the loop condition from || to && so the timed get exits when
EITHER the bridge is disposed OR the deadline expires. Previously a peer
that never delivered its BrokerInfo parked the bridge start thread until
disposal, ignoring the caller's timeout.

(cherry picked from commit c6f85bc)

Co-authored-by: Matt Pavlovich <mattrpav@apache.org>
cshannon added a commit that referenced this pull request Aug 6, 2026
…#2399) (#2411)

* [#2398] Add test proving FutureBrokerInfo.get(timeout) ignores its timeout

The timed get loop's condition uses || between the not-disposed check and
the deadline check, so the loop runs until disposal regardless of the
caller's timeout. Widens FutureBrokerInfo to package-private so the test
drives the real class. Two of four scenarios fail until the condition is
corrected.

* Fix FutureBrokerInfo.get(timeout) to honor its timeout

Correct the loop condition from || to && so the timed get exits when
EITHER the bridge is disposed OR the deadline expires. Previously a peer
that never delivered its BrokerInfo parked the bridge start thread until
disposal, ignoring the caller's timeout.

Co-authored-by: Matt Pavlovich <mattrpav@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants