Changeset 3d9b606


Ignore:
Timestamp:
Oct 2, 2010 5:07:37 PM (10 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
6cf7bc7
Parents:
042cde2
Message:
  • NetDB:
    • Expire unreachable routers quickly, even if they don't have introducers, so we don't have old data on routers that ran out of introducers.
    • Fix rare NPEs at shutdown
File:
1 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/networkdb/kademlia/KademliaNetworkDatabaseFacade.java

    r042cde2 r3d9b606  
    195195    public void shutdown() {
    196196        _initialized = false;
    197         _kb = null;
     197        // don't null out _kb, it can cause NPEs in concurrent operations
     198        //_kb = null;
    198199        if (_ds != null)
    199200            _ds.stop();
    200         _ds = null;
     201        // don't null out _ds, it can cause NPEs in concurrent operations
     202        //_ds = null;
    201203        _exploreKeys.clear(); // hope this doesn't cause an explosion, it shouldn't.
    202204        // _exploreKeys = null;
     
    751753            if (routerInfo.getAddresses().isEmpty())
    752754                return "Peer " + key.toBase64() + " published > 90m ago with no addresses";
     755            // This should cover the introducers case below too
     756            // And even better, catches the case where the router is unreachable but knows no introducers
     757            if (routerInfo.getCapabilities().indexOf(Router.CAPABILITY_UNREACHABLE) >= 0)
     758                return "Peer " + key.toBase64() + " published > 90m ago and thinks it is unreachable";
    753759            RouterAddress ra = routerInfo.getTargetAddress("SSU");
    754760            if (ra != null) {
Note: See TracChangeset for help on using the changeset viewer.