Changeset 9fd2f1e


Ignore:
Timestamp:
Sep 4, 2012 1:51:55 PM (8 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
5056706
Parents:
b984748
Message:

SSU: Fix some issues with queueing outbound establishments

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • history.txt

    rb984748 r9fd2f1e  
     12012-09-04 zzz
     2 * I2PTunnelServer: Clean shutdown after session exception
     3 * OutNetMessage: Speedup after profiling (ticket #707 - thx dg, kytv, zab)
     4 * SSU: Fix some issues with queueing outbound establishments
     5
    162012-08-31 zzz
    27 * i2psnark: Remove * from magnet and download names
  • router/java/src/net/i2p/router/RouterVersion.java

    rb984748 r9fd2f1e  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 22;
     21    public final static long BUILD = 23;
    2222
    2323    /** for example "-test" */
    24     public final static String EXTRA = "";
     24    public final static String EXTRA = "-rc";
    2525    public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;
    2626    public static void main(String args[]) {
  • router/java/src/net/i2p/router/transport/udp/EstablishmentManager.java

    rb984748 r9fd2f1e  
    9494
    9595    /** max queued msgs per peer while the peer connection is queued */
    96     private static final int MAX_QUEUED_PER_PEER = 3;
     96    private static final int MAX_QUEUED_PER_PEER = 16;
    9797   
    9898    private static final long MAX_NONCE = 0xFFFFFFFFl;
     
    303303            if (state == null) {
    304304                if (queueIfMaxExceeded && _outboundStates.size() >= getMaxConcurrentEstablish()) {
    305                     if (_queuedOutbound.size() >= MAX_QUEUED_OUTBOUND) {
     305                    if (_queuedOutbound.size() >= MAX_QUEUED_OUTBOUND && !_queuedOutbound.containsKey(to)) {
    306306                        rejected = true;
    307307                    } else {
    308                         if (_log.shouldLog(Log.WARN))
    309                             _log.warn("Queueing outbound establish, increase " + PROP_MAX_CONCURRENT_ESTABLISH);
    310308                        List<OutNetMessage> newQueued = new ArrayList(MAX_QUEUED_PER_PEER);
    311309                        List<OutNetMessage> queued = _queuedOutbound.putIfAbsent(to, newQueued);
    312                         if (queued == null)
     310                        if (queued == null) {
    313311                            queued = newQueued;
     312                            if (_log.shouldLog(Log.WARN))
     313                                _log.warn("Queueing outbound establish to " + to + ", increase " + PROP_MAX_CONCURRENT_ESTABLISH);
     314                        }
    314315                        // this used to be inside a synchronized (_outboundStates) block,
    315316                        // but that's now a CHM, so protect the ArrayList
     
    321322                                // increment for the stat below
    322323                                queueCount++;
     324                            } else {
     325                                rejected = true;
    323326                            }
    324327                            deferred = _queuedOutbound.size();
     
    372375        if (rejected) {
    373376            if (_log.shouldLog(Log.WARN))
    374                 _log.warn("Rejecting outbound establish");
     377                _log.warn("Too many pending, rejecting outbound establish to " + to);
    375378            _transport.failed(msg, "Too many pending outbound connections");
    376379            _context.statManager().addRateData("udp.establishRejected", deferred, 0);
Note: See TracChangeset for help on using the changeset viewer.