Skip to content

fix(actionqueue): guard cancel nil in StopCleanup - #2687

Open
directionless wants to merge 1 commit into
kolide:mainfrom
directionless:claude/fix-actionqueue-cancel-nil
Open

directionless wants to merge 1 commit into
kolide:mainfrom
directionless:claude/fix-actionqueue-cancel-nil

Conversation

@directionless

Copy link
Copy Markdown
Contributor

cancel is only set when StartCleanup is called. If StopCleanup is called first (e.g. during failed startup), cancel is nil and panics.

@directionless
directionless marked this pull request as ready for review April 12, 2026 02:29
Comment on lines +178 to 181
if aq.cancel != nil {
aq.cancel()
}
}

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.

We probably also want a lock around aq.cancel to avoid flaky data race failures in tests?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It passed CI, do you still think we need it?

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.

Yes, might as well if we're updating this area anyway

@directionless
directionless force-pushed the claude/fix-actionqueue-cancel-nil branch from 7a8c6b4 to 43b6fbd Compare April 13, 2026 18:58
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.

2 participants