etzel-mes commented on PR #28511: URL: https://github.com/apache/camel/pull/28511#issuecomment-6417329873
Thanks @davsclaus, all three are in 0e55717d4ea. 1. Disposed during connect: that branch now calls `connected.disposeFailed()`. By then `dispose()` has returned and nothing waits on the reconnect thread, so the non-waiting close fits; waiting would hold `lock` until CloseSession is answered. `CommunicationLossTest#connectionCompletedAfterDisposeIsClosed` disposes the manager while the connect is in flight (the relay listens but accepts only after `dispose()`) and checks that the relayed connection gets closed; it fails without the fix. 2. `onTransferFailed` now tears down only when `isCurrent(subscription)` under `lock`, the check `recoverSubscription` already uses. I took it over `!closed` because `dispose()` closes the connection outside the lock, so `closed` can still be false after `connected = null`. The other callbacks were already covered: session active/inactive check `closed`, and the status and watchdog paths reach the teardown only through `isCurrent`. No test for this one: it needs the old client in Transferring while the server rejects TransferSubscriptions, which the test server cannot do deterministically. 3. Dropped the error branch, with a short comment that the future completes normally. I also moved the disposed-during-connect case out of "Not done" in the description. _Claude Code on behalf of etzel-mes_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
