Changeset de07705


Ignore:
Timestamp:
Sep 2, 2009 3:02:19 PM (11 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
58e960c
Parents:
1571907
Message:

deliver more tags as the available number gets low

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/i2p/crypto/TransientSessionKeyManager.java

    r1571907 rde07705  
    5757 * If a single TagSet is not delivered, there will be no stall as long as the
    5858 * current window size is smaller than the minimum tag threshold.
    59  * A second consecutive TagSet delivery failure will cause a complete stall, as
     59 * Additional TagSets will be sent before the acked tags completely run out. See below.
    6060 * all subsequent messages will fail to decrypt.
    6161 * See ConnectionOptions in streaming for more information.
     
    421421        if ( (sessionTags.size() <= 0) && (_log.shouldLog(Log.DEBUG)) )
    422422            _log.debug("Received 0 tags for key " + key);
    423         if (false) aggressiveExpire();
     423        //if (false) aggressiveExpire();
    424424    }
    425425   
     
    811811                for (int i = 0; i < _tagSets.size(); i++) {
    812812                    TagSet set = _tagSets.get(i);
    813                     if (set.getDate() + SESSION_TAG_DURATION_MS > now)
    814                         tags += set.getTags().size();
     813                    if (set.getDate() + SESSION_TAG_DURATION_MS > now) {
     814                        int sz = set.getTags().size();
     815                        // so tags are sent when the acked tags are below
     816                        // 30, 17, and 4.
     817                        if (!set.getAcked())
     818                            sz /= 3;
     819                        tags += sz;
     820                    }
    815821                }
    816822            }
     
    861867        private long _date;
    862868        //private Exception _createdBy;
    863         /** only used in renderStatusHTML() for debugging */
     869        /** did we get an ack for this tagset? */
    864870        private boolean _acked;
    865871
     
    919925
    920926        public void setAcked() { _acked = true; }
    921         /** only used in renderStatusHTML() for debugging */
    922927        public boolean getAcked() { return _acked; }
    923928       
Note: See TracChangeset for help on using the changeset viewer.