cache circuits by circId

This commit is contained in:
Nathan Freitas 2017-01-14 06:40:25 -05:00
parent c9fc49a2de
commit 19539620a9
1 changed files with 3 additions and 3 deletions

View File

@ -190,7 +190,7 @@ public class TorEventHandler implements EventHandler, TorServiceConstants {
{ {
node.id = nodeParts[0].substring(1); node.id = nodeParts[0].substring(1);
node.name = nodeParts[1]; node.name = nodeParts[1];
} }
node.status = status; node.status = status;
@ -215,12 +215,12 @@ public class TorEventHandler implements EventHandler, TorServiceConstants {
if (node.ipAddress == null) if (node.ipAddress == null)
mService.exec(new ExternalIPFetcher(node)); mService.exec(new ExternalIPFetcher(node));
hmBuiltNodes.put(node.id, node); hmBuiltNodes.put(circID, node);
} }
if (status.equals("CLOSED")) if (status.equals("CLOSED"))
{ {
hmBuiltNodes.remove(node.id); hmBuiltNodes.remove(circID);
} }
} }