Changeset c3181d85


Ignore:
Timestamp:
Nov 10, 2016 3:09:39 PM (4 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
aeeee0e
Parents:
24ecc85
Message:

Transport: Use NTCP for some outbound connections even before
SSU minimums are met (ticket #1835)

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • history.txt

    r24ecc85 rc3181d85  
     12016-11-10 zzz
     2 * Transport: Use NTCP for some outbound connections even before
     3   SSU minimums are met (ticket #1835)
     4
     52016-11-09 zzz
     6 * Transport: Add stats for inbound v4/v6 connections (ticket #1854)
     7 * Tunnels: Reduce default VTBM records from 5 to 4
     8
     92016-11-08 zzz
     10 * Build: Fix minimum Java version for Windows
     11 * Install: Add max memory option to runplain.sh
     12 * Crypto: Change serial number in selfsigned certs from int to long
     13 * Router: Fix low-memory log messages for non-wrapper (ticket #1795)
     14 * Transport: Improve IPv6 selection logic
     15
    1162016-11-06 zzz
    217 * Console: Add Java 9 log warning (ticket #1870)
  • router/java/src/net/i2p/router/RouterVersion.java

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

    r24ecc85 rc3181d85  
    17701770            // never get any introducers)
    17711771            int count = _peersByIdent.size();
    1772             if (alwaysPreferUDP() || count < _min_peers ||
    1773                 (_haveIPv6Address && count < _min_v6_peers) ||
    1774                 (introducersRequired() && _introManager.introducerCount() < MIN_INTRODUCER_POOL))
     1772            if (alwaysPreferUDP()) {
    17751773                return _cachedBid[SLOW_PREFERRED_BID];
    1776             else if (preferUDP())
     1774            } else if (count < _min_peers ||
     1775                       (_haveIPv6Address && count < _min_v6_peers) ||
     1776                       (introducersRequired() && _introManager.introducerCount() < MIN_INTRODUCER_POOL)) {
     1777                 // Even if we haven't hit our minimums, give NTCP a chance some of the time.
     1778                 // This may make things work a little faster at startup
     1779                 // (especially when we have an IPv6 address and the increased minimums),
     1780                 // and if UDP is completely blocked we'll still have some connectivity.
     1781                 // TODO After some time, decide that UDP is blocked/broken and return TRANSIENT_FAIL_BID?
     1782                if (_context.random().nextInt(4) == 0)
     1783                    return _cachedBid[SLOWEST_BID];
     1784                else
     1785                    return _cachedBid[SLOW_PREFERRED_BID];
     1786            } else if (preferUDP()) {
    17771787                return _cachedBid[SLOW_BID];
    1778             else if (haveCapacity()) {
     1788            } else if (haveCapacity()) {
    17791789                if (addr.getCost() > DEFAULT_COST)
    17801790                    return _cachedBid[SLOWEST_COST_BID];
Note: See TracChangeset for help on using the changeset viewer.