Changeset 30702e9


Ignore:
Timestamp:
Sep 1, 2011 11:59:55 PM (8 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
f4e64d9
Parents:
1bd71ab
Message:

sent relay tag cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/transport/udp/EstablishmentManager.java

    r1bd71ab r30702e9  
    285285            // count as connections, we have to keep the connection to this peer up longer if
    286286            // we are offering introductions.
    287             if ((!_context.router().isHidden()) && (!_transport.introducersRequired()) && _transport.haveCapacity()) {
     287            if ((!_context.router().isHidden()) && (!_transport.introducersRequired()) && _transport.haveCapacity() &&
     288                !((FloodfillNetworkDatabaseFacade)_context.netDb()).floodfillEnabled()) {
    288289                // ensure > 0
    289290                long tag = 1 + _context.random().nextLong(MAX_TAG_VALUE);
     
    596597    private void sendCreated(InboundEstablishState state) {
    597598        long now = _context.clock().now();
    598         // don't offer if we are approaching max connections (see comments above)
     599        // This is usually handled in receiveSessionRequest() above, except, I guess,
     600        // if the session isn't new and we are going through again.
     601        // Don't offer if we are approaching max connections (see comments above)
    599602        // Also don't offer if we are floodfill, as this extends the max idle time
    600603        // and we will have lots of incoming conns
    601         if ((!_transport.introducersRequired()) && _transport.haveCapacity() &&
     604        if ((!_context.router().isHidden()) && (!_transport.introducersRequired()) && _transport.haveCapacity() &&
    602605            !((FloodfillNetworkDatabaseFacade)_context.netDb()).floodfillEnabled()) {
    603606            // offer to relay
Note: See TracChangeset for help on using the changeset viewer.