Changeset aabbdc1


Ignore:
Timestamp:
Jul 6, 2013 1:25:11 PM (7 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
b607d7b
Parents:
3aafea0
Message:

Hopefully fix SSU NPE (ticket #967)

File:
1 edited

Legend:

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

    r3aafea0 raabbdc1  
    7070    private final OutboundMessageFragments.ActiveThrottle _activeThrottle;
    7171    private OutboundRefiller _refiller;
    72     private PacketPusher _pusher;
     72    private volatile PacketPusher _pusher;
    7373    private final InboundMessageFragments _inboundFragments;
    7474    //private UDPFlooder _flooder;
     
    424424        }
    425425
    426         _establisher.startup();
    427426        _handler.startup();
    428427        _fragments.startup();
     
    430429        _pusher = new PacketPusher(_context, _fragments, _endpoints);
    431430        _pusher.startup();
     431        // must be after pusher
     432        _establisher.startup();
    432433        if (USE_PRIORITY)
    433434            _refiller.startup();
     
    14141415   
    14151416    /**
    1416      *  This sends it directly out, bypassing OutboundMessageFragments
    1417      *  and the PacketPusher. The only queueing is for the bandwidth limiter.
     1417     *  This sends it directly out, bypassing OutboundMessageFragments.
     1418     *  The only queueing is for the bandwidth limiter.
    14181419     *  BLOCKING if OB queue is full.
    14191420     */
    14201421    void send(UDPPacket packet) {
    1421         if (_log.shouldLog(Log.DEBUG))
    1422             _log.debug("Sending packet " + packet);
    1423         _pusher.send(packet);
     1422        if (_pusher != null) {
     1423            if (_log.shouldLog(Log.DEBUG))
     1424                _log.debug("Sending packet " + packet);
     1425            _pusher.send(packet);
     1426        } else {
     1427            _log.error("No pusher", new Exception());
     1428        }
    14241429    }
    14251430   
Note: See TracChangeset for help on using the changeset viewer.