I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 1f088ff3 authored by zzz's avatar zzz
Browse files

NetDb: Look in all SSU addresses for introducers in the expiration check

parent 50d038af
No related branches found
No related tags found
No related merge requests found
...@@ -187,7 +187,7 @@ public class RouterInfo extends DatabaseEntry { ...@@ -187,7 +187,7 @@ public class RouterInfo extends DatabaseEntry {
* @return unmodifiable view, non-null * @return unmodifiable view, non-null
*/ */
public Collection<RouterAddress> getAddresses() { public Collection<RouterAddress> getAddresses() {
return Collections.unmodifiableCollection(_addresses); return Collections.unmodifiableList(_addresses);
} }
/** /**
......
...@@ -984,9 +984,8 @@ public class KademliaNetworkDatabaseFacade extends NetworkDatabaseFacade { ...@@ -984,9 +984,8 @@ public class KademliaNetworkDatabaseFacade extends NetworkDatabaseFacade {
// And even better, catches the case where the router is unreachable but knows no introducers // And even better, catches the case where the router is unreachable but knows no introducers
if (routerInfo.getCapabilities().indexOf(Router.CAPABILITY_UNREACHABLE) >= 0) if (routerInfo.getCapabilities().indexOf(Router.CAPABILITY_UNREACHABLE) >= 0)
return "Old peer and thinks it is unreachable"; return "Old peer and thinks it is unreachable";
// FIXME check all SSU addresses, not just first // Just check all the addresses, faster than getting just the SSU ones
RouterAddress ra = routerInfo.getTargetAddress("SSU"); for (RouterAddress ra : routerInfo.getAddresses()) {
if (ra != null) {
// Introducers change often, introducee will ping introducer for 2 hours // Introducers change often, introducee will ping introducer for 2 hours
if (ra.getOption("ihost0") != null) if (ra.getOption("ihost0") != null)
return "Old peer with SSU Introducers"; return "Old peer with SSU Introducers";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment