Skip to content

Commit

Permalink
REST API Fix such that if a newly registered node doesn't have node h…
Browse files Browse the repository at this point in the history
…ost information yet, we don't throw index out of bounds error.
  • Loading branch information
gwilmer committed Jan 4, 2013
1 parent 434f56b commit d4f85bb
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -743,7 +743,9 @@ private Node nodeImpl(ISymmetricEngine engine) {
xmlNode.setSyncUrl(modelNode.getSyncUrl());
xmlNode.setBatchInErrorCount(modelNode.getBatchInErrorCount());
xmlNode.setBatchToSendCount(modelNode.getBatchToSendCount());
xmlNode.setLastHeartbeat(nodeHosts.get(0).getHeartbeatTime());
if (nodeHosts.size() > 0) {
xmlNode.setLastHeartbeat(nodeHosts.get(0).getHeartbeatTime());
}
xmlNode.setRegistered(nodeSecurity.hasRegistered());
xmlNode.setInitialLoaded(nodeSecurity.hasInitialLoaded());
xmlNode.setReverseInitialLoaded(nodeSecurity.hasReverseInitialLoaded());
Expand Down

0 comments on commit d4f85bb

Please sign in to comment.