mirror of
https://github.com/i2p/i2p.i2p.git
synced 2026-10-23 08:42:58 +00:00
NetDb: Look in all SSU addresses for introducers in the expiration check
This commit is contained in:
1 parent
50d038af5d
commit
1f088ff3e5
2 files changed
+3
-4
No files matched your search
@@ -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