Skip to content

fix(audit): remove unwrap from target shutdown path#2668

Merged
houseme merged 2 commits into
rustfs:mainfrom
marshawcoco:fix/audit-remove-unwrap
Apr 24, 2026
Merged

fix(audit): remove unwrap from target shutdown path#2668
houseme merged 2 commits into
rustfs:mainfrom
marshawcoco:fix/audit-remove-unwrap

Conversation

@marshawcoco
Copy link
Copy Markdown
Contributor

Summary

  • replace the unwrap in AuditRegistry::close_all with an if let Some(error) branch so the shutdown path stays within the crate panic policy

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

CLA requirements are satisfied for this pull request.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the audit subsystem shutdown path to avoid panicking during target cleanup by removing an unwrap() in AuditRegistry::close_all, aligning shutdown behavior with the crate’s panic policy.

Changes:

  • Replace unwrap() on the collected error list with an if let Some(error) branch when returning the first shutdown error.

@loverustfs loverustfs requested a review from houseme April 24, 2026 08:35
@houseme houseme added this pull request to the merge queue Apr 24, 2026
Merged via the queue into rustfs:main with commit 2705e3f Apr 24, 2026
12 checks passed
@marshawcoco marshawcoco deleted the fix/audit-remove-unwrap branch May 4, 2026 15:35
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.

3 participants