Skip to content

Make TimeoutsHolder.start idempotent - #2319

Merged
hyperxpro merged 1 commit into
mainfrom
fix/timeouts-holder-start-idempotent
Aug 26, 2026
Merged

Make TimeoutsHolder.start idempotent#2319
hyperxpro merged 1 commit into
mainfrom
fix/timeouts-holder-start-idempotent

Conversation

@hyperxpro

Copy link
Copy Markdown
Member

Motivation:

TimeoutsHolder#start() is public and nothing stops it running twice. A second call overwrites the first scheduler handle, leaving an entry nobody can cancel.

Modification:

Guard start() with a started AtomicBoolean CAS so only the first call arms, and say so in its Javadoc.

Result:

A repeated start() is a no-op instead of orphaning a scheduled entry.

@hyperxpro
hyperxpro merged commit 510279b into main Aug 26, 2026
29 of 30 checks passed
@hyperxpro
hyperxpro deleted the fix/timeouts-holder-start-idempotent branch August 26, 2026 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant