Changeset d500f61 for router


Ignore:
Timestamp:
Jun 17, 2018 4:00:17 PM (2 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
5592992
Parents:
8eb6dc0
Message:

NTCP: Log and fail messages on outbound queue overflow

File:
1 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/transport/ntcp/NTCPConnection.java

    r8eb6dc0 rd500f61  
    472472     */
    473473    public void send(OutNetMessage msg) {
    474         _outbound.offer(msg);
     474        if (!_outbound.offer(msg)) {
     475            if (_log.shouldWarn())
     476                _log.warn("outbound queue full on " + this + ", dropping message " + msg);
     477            _transport.afterSend(msg, false, false, msg.getLifetime());
     478            return;
     479        }
    475480        boolean noOutbound = (getCurrentOutbound() == null);
    476481        if (isEstablished() && noOutbound)
Note: See TracChangeset for help on using the changeset viewer.