Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
0001117: registration_enabled doesn't get set to 0 when node is reall…
…y registered
  • Loading branch information
chenson42 committed Mar 18, 2013
1 parent 9a8056e commit 903e1de
Showing 1 changed file with 15 additions and 1 deletion.
Expand Up @@ -329,7 +329,21 @@ public void registerWithServer() {

if (!registered && (maxNumberOfAttempts < 0 || maxNumberOfAttempts > 0)) {
registered = isRegisteredWithServer();
} else {
if (registered) {
log.info("We registered, but were not able to acknowledge our registration. Sending a sql event to the node where we registered to indicate that we are alive and registered");
Node identity = nodeService.findIdentity();
Node parentNode = nodeService.findNode(identity.getCreatedAtNodeId());
dataService
.insertSqlEvent(
parentNode,
"update "
+ tablePrefix
+ "_node_security set registration_enabled=1,registration_time=current_timestamp where node_id='"
+ identity.getNodeId() + "'", false);
}
}

if (registered) {
Node node = nodeService.findIdentity();
if (node != null) {
log.info("Successfully registered node [id={}]", node.getNodeId());
Expand Down

0 comments on commit 903e1de

Please sign in to comment.