diff --git a/apps/routerconsole/java/src/net/i2p/router/web/helpers/NetDbRenderer.java b/apps/routerconsole/java/src/net/i2p/router/web/helpers/NetDbRenderer.java index f2acb80b10..2755e084e4 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/helpers/NetDbRenderer.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/helpers/NetDbRenderer.java @@ -699,14 +699,13 @@ public void renderLeaseSetHTML(Writer out, boolean debug, Hash client) throws IO } leases.addAll(netdb.getLeases()); LeaseSet myLeaseSet = new LeaseSet(); - if (netdb.getLeases().size() > 0) - myLeaseSet = new ArrayList(netdb.getLeases()).get(0); + if (leases.size() > 0) + myLeaseSet = netdb.lookupLeaseSetLocally(client); int medianCount = 0; int rapCount = 0; BigInteger median = null; int c = 0; - // Summary if (debug) { buf.append("\n"); @@ -716,7 +715,7 @@ public void renderLeaseSetHTML(Writer out, boolean debug, Hash client) throws IO if (client != null) { buf.append("
").append(_t("Leasesets for Client")).append(": "); buf.append(client.toBase32()); - if (netdb.getLeases().size() > 0) { + if (leases.size() > 0) { TunnelPoolSettings in = _context.tunnelManager().getInboundSettings(myLeaseSet.getHash()); if (in != null && in.getDestinationNickname() != null) buf.append(" - ").append(DataHelper.escapeHTML(in.getDestinationNickname())); @@ -833,7 +832,7 @@ public void renderLeaseSetHTML(Writer out, boolean debug, Hash client) throws IO } else { distance = null; } - if (myLeaseSet == null || ls.getHash() != myLeaseSet.getHash()) { + if (ls.getHash().equals(myLeaseSet.getHash())) { renderLeaseSet(buf, ls, debug, now, linkSusi, distance); out.write(buf.toString()); buf.setLength(0);