-
Notifications
You must be signed in to change notification settings - Fork 49
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
Adding provision to clean out alternate config #586
Conversation
@@ -1242,8 +1240,19 @@ protected void withAlternateClient(Runnable evaluator) { | |||
} | |||
} | |||
|
|||
protected void mirrorDeviceConfig() { | |||
String receivedConfig = actualize(stringify(receivedUpdates.get(CONFIG_SUBTYPE))); | |||
protected void mirrorToOtherConfig() { |
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.
Could we have some line by line comments here? It's getting fairly dense...
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.
done
} | ||
|
||
protected void clearOtherConfig() { | ||
updateMirrorConfig("{}"); |
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.
Comments please. Should this run in all conditions or are there any useful assertions to add that help document what's going on.
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.
done
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 don't know what assertions to add -- I added one to make sure the client was setup correctly, but if that was the case it would have had a horrible NPE anyway -- it's just a bit more clear.
Updated with comments. |
Nukes the not-in-use config to prevent it inadvertently being used to bounce around from a not-used endpoint.