mirror of
https://github.com/i2p/i2p.i2p.git
synced 2024-12-06 19:27:00 +01:00
NetDb: Look in all SSU addresses for introducers in the expiration check
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+2
-3
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user