Skip to content

fix(#33): initialize previous channel snapshot if null, avoiding null reference condition#34

Merged
casuffitsharp merged 1 commit intomainfrom
fix/33
Mar 2, 2026
Merged

fix(#33): initialize previous channel snapshot if null, avoiding null reference condition#34
casuffitsharp merged 1 commit intomainfrom
fix/33

Conversation

@casuffitsharp
Copy link
Copy Markdown
Owner

@casuffitsharp casuffitsharp commented Mar 2, 2026

No description provided.

Copilot AI review requested due to automatic review settings March 2, 2026 23:13
@casuffitsharp casuffitsharp changed the title fix(#33): initialize previous channel snapshot if null, avoiding null… fix(#33): initialize previous channel snapshot if null, avoiding null reference condition Mar 2, 2026
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Mar 2, 2026

@casuffitsharp casuffitsharp added the bug Something isn't working label Mar 2, 2026
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 addresses a potential null reference in the monitoring pipeline by ensuring a “previous channel snapshot” exists before computing deltas for IO channel metrics.

Changes:

  • Initialize prevSnapshot with a default ChannelSnapshot when TryGetValue returns null.
  • Prevent null-reference exceptions during delta computation in CollectChannelMetric.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@casuffitsharp casuffitsharp merged commit 869d1ef into main Mar 2, 2026
12 of 13 checks passed
@casuffitsharp casuffitsharp deleted the fix/33 branch March 2, 2026 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants