diff --git a/router/java/src/net/i2p/data/router/RouterInfo.java b/router/java/src/net/i2p/data/router/RouterInfo.java index bc96fa853c312e553bb730ea3eb9d70c53f05da7..de33402f2ac19b7ee8ae8e02c6048ffb2b248fde 100644 --- a/router/java/src/net/i2p/data/router/RouterInfo.java +++ b/router/java/src/net/i2p/data/router/RouterInfo.java @@ -187,7 +187,7 @@ public class RouterInfo extends DatabaseEntry { * @return unmodifiable view, non-null */ public Collection<RouterAddress> getAddresses() { - return Collections.unmodifiableCollection(_addresses); + return Collections.unmodifiableList(_addresses); } /** diff --git a/router/java/src/net/i2p/router/networkdb/kademlia/KademliaNetworkDatabaseFacade.java b/router/java/src/net/i2p/router/networkdb/kademlia/KademliaNetworkDatabaseFacade.java index ea6e32158a0738a58996a988ba93d1ab919aab53..2e2152ceac68980724ca8e62646788c47f5c6590 100644 --- a/router/java/src/net/i2p/router/networkdb/kademlia/KademliaNetworkDatabaseFacade.java +++ b/router/java/src/net/i2p/router/networkdb/kademlia/KademliaNetworkDatabaseFacade.java @@ -984,9 +984,8 @@ public class KademliaNetworkDatabaseFacade extends NetworkDatabaseFacade { // And even better, catches the case where the router is unreachable but knows no introducers if (routerInfo.getCapabilities().indexOf(Router.CAPABILITY_UNREACHABLE) >= 0) return "Old peer and thinks it is unreachable"; - // FIXME check all SSU addresses, not just first - RouterAddress ra = routerInfo.getTargetAddress("SSU"); - if (ra != null) { + // Just check all the addresses, faster than getting just the SSU ones + for (RouterAddress ra : routerInfo.getAddresses()) { // Introducers change often, introducee will ping introducer for 2 hours if (ra.getOption("ihost0") != null) return "Old peer with SSU Introducers";