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

Fixes #613. #614

Merged
merged 1 commit into from
Oct 31, 2016
Merged

Fixes #613. #614

merged 1 commit into from
Oct 31, 2016

Conversation

HEskandari
Copy link
Contributor

@HEskandari HEskandari commented Oct 31, 2016

Doing a null check on the url SI connects to. Also doing that on OnInitialize to fix the auto-connect on startup issue.


Fixes #613

@HEskandari
Copy link
Contributor Author

@Particular/serviceinsight-maintainers Please review.

@distantcam distantcam merged commit 4d43c52 into master Oct 31, 2016
@distantcam distantcam deleted the fixing-previous-connection-issue branch October 31, 2016 05:12
@adamralph
Copy link
Member

@HEskandari why was this tagged as being blocked?

@@ -15,6 +15,11 @@ public void ConnectTo(string url)
{
Url = url;

if (url == null)
Copy link
Member

Choose a reason for hiding this comment

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

Would it be better to throw an exception in this case? I guess we're fixing the problem at the call site below?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Don't think so. This is called on application start as well which means if an exception is thrown the app will crash.

Copy link
Member

Choose a reason for hiding this comment

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

The only usages I see are

The code smell I'm detecting is the setting of the Url property to null and then avoiding the clearing of controls, refreshing etc. when that is the case. I guess the overall question is: does the behaviour of this method make sense when the passed in URL is null, in the context of the expectation of all consumers of this type?

@adamralph
Copy link
Member

Removed the blocked tag. I'm not sure why it was added in the first place, but it seems redundant since a) the changes were merged and b) the changes were reverted in #617.

#613 is being re-fixed.

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.

NRE when auto-connecting to a ServiceControl instance that is no longer available
3 participants