Changeset fe6c7cd


Ignore:
Timestamp:
Jun 3, 2019 12:12:43 PM (10 months ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
697b617c
Parents:
eea0990
Message:

Transport: Fix large messages in SSU (ticket #2505)

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • history.txt

    reea0990 rfe6c7cd  
     12019-06-03 zzz
     2 * Transport: Fix large messages in SSU (ticket #2505)
     3
    142019-06-02 zzz
    25 * Build: Fix Debian (ticket #2517)
     6 * i2ptunnel: Add new getInstance() method for Android
     7 * Update PAC file for additional security
    38
    492019-06-01 zzz
  • router/java/src/net/i2p/router/RouterVersion.java

    reea0990 rfe6c7cd  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 8;
     21    public final static long BUILD = 9;
    2222
    2323    /** for example "-test" */
  • router/java/src/net/i2p/router/transport/udp/PeerState.java

    reea0990 rfe6c7cd  
    479479    //public boolean getRemoteWantsPreviousACKs() { return _remoteWantsPreviousACKs; }
    480480
    481     /** how many bytes should we send to the peer in a second */
     481    /**
     482     *  how many bytes should we send to the peer in a second
     483     *  1st stat in CWND column, otherwise unused,
     484     *  candidate for removal
     485     */
    482486    public int getSendWindowBytes() {
    483487        synchronized(_outboundMessages) {
     
    683687    //public void remoteDoesNotWantPreviousACKs() { _remoteWantsPreviousACKs = false; }
    684688   
    685     /** should we ignore the peer state's congestion window, and let anything through? */
    686     private static final boolean IGNORE_CWIN = false;
    687     /** should we ignore the congestion window on the first push of every message? */
    688     private static final boolean ALWAYS_ALLOW_FIRST_PUSH = false;
    689    
    690689    /**
    691690     * Decrement the remaining bytes in the current period's window,
     
    718717            _lastSendRefill = now;
    719718        }
    720         //if (true) return true;
    721         if (IGNORE_CWIN || size <= _sendWindowBytesRemaining || (ALWAYS_ALLOW_FIRST_PUSH && messagePushCount == 0)) {
     719
     720        // Ticket 2505
     721        // We always send all unacked fragments for a message,
     722        // because we don't have any mechanism in OutboundMessageFragments
     723        // to track the next send time for fragments individually.
     724        // Huge messages that are larger than the window size could never
     725        // get sent and block the outbound queue forever.
     726        // So we let it through when the window is empty (full window remaining).
     727        if (size <= _sendWindowBytesRemaining ||
     728            (size > _sendWindowBytes && _sendWindowBytesRemaining >= _sendWindowBytes)) {
    722729            if ( (messagePushCount == 0) && (_concurrentMessagesActive > _concurrentMessagesAllowed) ) {
    723730                _consecutiveRejections++;
     
    732739            }
    733740            _sendWindowBytesRemaining -= size;
     741            if (_sendWindowBytesRemaining < 0)
     742                _sendWindowBytesRemaining = 0;
    734743            _sendBytes += size;
    735744            _lastSendTime = now;
     
    768777  ****/
    769778
     779    /**
     780     *  stat in SST column, otherwise unused,
     781     *  candidate for removal
     782     */
    770783    public int getSlowStartThreshold() { return _slowStartThreshold; }
    771784
     785    /**
     786     *  2nd stat in CWND column, otherwise unused,
     787     *  candidate for removal
     788     */
    772789    public int getConcurrentSends() {
    773790        synchronized(_outboundMessages) {
     
    776793    }
    777794
     795    /**
     796     *  3rd stat in CWND column, otherwise unused,
     797     *  candidate for removal
     798     */
    778799    public int getConcurrentSendWindow() {
    779800        synchronized(_outboundMessages) {
     
    782803    }
    783804
     805    /**
     806     *  4th stat in CWND column, otherwise unused,
     807     *  candidate for removal
     808     */
    784809    public int getConsecutiveSendRejections() {
    785810        synchronized(_outboundMessages) {
Note: See TracChangeset for help on using the changeset viewer.