SSU: Move statement affecting debug stats (ticket #2676)

This commit is contained in:
zzz
2019-12-20 12:58:04 +00:00
parent c5904b080b
commit c3138793fe

View File

@@ -462,10 +462,10 @@ class OutboundMessageFragments {
" data bytes to " + peer);
_context.statManager().addRateData("udp.sendFragmentsPerPacket", sendNext.size());
}
sendNext.clear();
if (pkt == null) {
if (_log.shouldLog(Log.WARN))
_log.info("Build packet FAIL for " + DataHelper.toString(sendNext) + " to " + peer);
sendNext.clear();
continue;
}
rv.add(pkt);
@@ -492,6 +492,7 @@ class OutboundMessageFragments {
// following for debugging and stats
pkt.setFragmentCount(sendNext.size());
pkt.setMessageType(msgType); //type of first fragment
sendNext.clear();
}