-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
NetworkHelper updates to fix crashes logged #1682
Conversation
Add UpdateConnectionInformation method to NetworkHelper Add try catch to UpdateConnectionInformation Lock NetworkHelper.ConnectionInformation before calling update. Add Reset method to ConnectionInformation Tweaks to ConnectionInformation.UpdateConnectionInformation method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good other than the change in the virtual method definition.
@@ -30,22 +30,20 @@ public class ConnectionInformation | |||
/// Updates the current object based on profile passed. | |||
/// </summary> | |||
/// <param name="profile">instance of <see cref="ConnectionProfile"/></param> | |||
public virtual void UpdateConnectionInformation(ConnectionProfile profile) | |||
public void UpdateConnectionInformation(ConnectionProfile profile) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this be considered a breaking change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I consider that method as not being sufficient for anyone to override.
How and why it was marked virtual is a mystery to me.
For anyone insane enough to inherit from connection information object yes it's a bragging change though I'm at loss as to why one would.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it sound like this is fixing a bug then instead ;)
Approved
This PR is linked to unclosed issues. Please check if one of these issues should be closed: #1645 |
Issue: #1645
PR Type
What kind of change does this PR introduce?
What is the current behavior?
There are no exception handlers and passing null when initialising the NetworkHelper isn't ideal.
PR Checklist
Please check if your PR fulfills the following requirements:
What is the new behavior?
Add UpdateConnectionInformation method to NetworkHelper
Add try catch to UpdateConnectionInformation
Lock NetworkHelper.ConnectionInformation before calling update.
Add Reset method to ConnectionInformation
Tweaks to ConnectionInformation.UpdateConnectionInformation method
Does this PR introduce a breaking change?
Other information