Changeset bc85543


Ignore:
Timestamp:
Jun 15, 2015 2:35:15 PM (5 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
036b777
Parents:
2b9ffc1
Message:

Fix removal of subsession aliases from tunnel manager on
I2CP connection shutdown
Sort tweaks for shared clients in summary bar

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/src/net/i2p/router/web/SummaryHelper.java

    r2b9ffc1 rbc85543  
    492492            String lname = getName(lhs);
    493493            String rname = getName(rhs);
    494             if (lname.equals(xsc))
     494            boolean lshared = lname.startsWith("shared clients") || lname.startsWith(xsc);
     495            boolean rshared = rname.startsWith("shared clients") || rname.startsWith(xsc);
     496            if (lshared && !rshared)
    495497                return -1;
    496             if (rname.equals(xsc))
     498            if (rshared && !lshared)
    497499                return 1;
    498500            return Collator.getInstance().compare(lname, rname);
  • router/java/src/net/i2p/router/client/ClientConnectionRunner.java

    r2b9ffc1 rbc85543  
    203203            if (ls != null)
    204204                _context.netDb().unpublish(ls);
     205            if (!sp.isPrimary)
     206                _context.tunnelManager().removeAlias(sp.dest);
    205207        }
    206208        synchronized (_alreadyProcessed) {
     
    415417                    _context.netDb().unpublish(ls);
    416418                isPrimary = sp.isPrimary;
    417             }
    418         }
    419         if (isPrimary) {
     419                if (!isPrimary)
     420                    _context.tunnelManager().removeAlias(sp.dest);
     421                break;
     422            }
     423        }
     424        if (isPrimary && !_sessions.isEmpty()) {
    420425            // kill all the others also
    421426            for (SessionParams sp : _sessions.values()) {
    422                 _manager.unregisterSession(id, sp.dest);
     427                if (_log.shouldLog(Log.INFO))
     428                    _log.info("Destroying remaining client subsession " + sp.sessionId);
     429                _manager.unregisterSession(sp.sessionId, sp.dest);
    423430                LeaseSet ls = sp.currentLeaseSet;
    424431                if (ls != null)
    425432                    _context.netDb().unpublish(ls);
     433                _context.tunnelManager().removeAlias(sp.dest);
    426434            }
    427435        }
  • router/java/src/net/i2p/router/client/ClientManager.java

    r2b9ffc1 rbc85543  
    221221     */
    222222    public void unregisterConnection(ClientConnectionRunner runner) {
    223         if (_log.shouldLog(Log.WARN))
    224             _log.warn("Unregistering (dropping) a client connection");
    225223        synchronized (_pendingRunners) {
    226224            _pendingRunners.remove(runner);
     
    229227        List<SessionId> ids = runner.getSessionIds();
    230228        List<Destination> dests = runner.getDestinations();
     229        if (_log.shouldLog(Log.WARN))
     230            _log.warn("Unregistering (dropping) a client connection with ids: " + ids);
    231231        synchronized (_runners) {
    232232            for (SessionId id : ids) {
  • router/java/src/net/i2p/router/client/ClientMessageEventListener.java

    r2b9ffc1 rbc85543  
    427427            _runner.stopRunning();
    428428        } else {
    429             if (cfg != null)
    430                 _context.tunnelManager().removeAlias(cfg.getDestination());
    431429            if (_log.shouldLog(Log.INFO))
    432430                _log.info("Still " + left + " sessions left");
Note: See TracChangeset for help on using the changeset viewer.