prosgarz35 commented on PR #3198:
URL: https://github.com/apache/james-project/pull/3198#issuecomment-5826052510
Pushed a follow-up commit with further lifecycle and concurrency
hardening:
1. **Line Callback Guard & Flag Consistency**:
- Added an immediate `if (!idleActive.get()) return Mono.empty();`
guard prior to setting `lineHandlerInstalled.set(true)` in the line callback.
This prevents falsely marking the handler as installed if the IDLE session was
already cleaned up by a concurrent heartbeat or transport drop.
2. **Eliminated Redundant Responder Wrapping**:
- Simplified `IdleMailboxListener` constructor to directly use the
passed `safeResponder` instance rather than invoking
`session.threadSafe(responder)` a second time.
3. **Deselect Lifecycle Test Coverage**:
- Added `deselectShouldClearIdleListener` in
`SelectedMailboxImplTest`, proving that `deselect()` cleanly resets the mailbox
idle listener state.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]