allthingssecurity commented on PR #30924:
URL: https://github.com/apache/camel/pull/30924#issuecomment-7214921775

   Thanks Claus, applied in 183ee7f0: `setNewSession` closes the session it 
replaces, outside `sessionLock` and with the listener removed first, so the 
start's session is kept in both orders, matching the guard from the previous 
commit and the producer. The new test 
`consumerStartClosesTheSessionThatAReconnectAttemptSetMeanwhile` runs the 
attempt inside the `afterBind` hook of the start's session; it fails without 
the change (the attempt's session stays bound) and passes with it.
   
   One note on the producer: it has a much smaller version of the same race. An 
attempt that binds and sets its session before the start reaches 
`connectLock.tryLock()` would be overwritten. I left it unchanged here, as the 
start holds `connectLock` for the rest; if you prefer, the same 
close-the-replaced-session step can go into `SmppProducer` too.


-- 
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]

Reply via email to