Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct swapped input/output and add error handling #337

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Virsacer
Copy link

Hi,
maxInputRate and maxOutputRate can be different so they should be used accordingly.
Also added some checks to prevent errors.

Copy link

codeautopilot bot commented Sep 26, 2024

PR summary

This Pull Request addresses two main issues in the InterfaceSubsystem.pm file of the CheckNwcHealth plugin:

  1. Corrects the usage of maxInputRate and maxOutputRate to ensure they are applied correctly for input and output rates respectively.
  2. Adds error handling to prevent potential errors when these rates are not defined.

The changes ensure that the correct maximum rates are used for calculations and that the code gracefully handles cases where these rates might be undefined, improving the robustness and accuracy of the plugin.

Suggestion

Consider adding unit tests to verify the new error handling logic and ensure that the correct rates are used in various scenarios. This will help in maintaining the integrity of the changes and prevent future regressions.

Disclaimer: This comment was entirely generated using AI. Be aware that the information provided may be incorrect.

Current plan usage: 75.86%

Have feedback or need help?
Discord
Documentation
[email protected]

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