streaming debug log tweak and notes on ID mismatch

This commit is contained in:
zzz
2019-07-23 21:08:30 +00:00
parent 72ef065ab7
commit 3a0873c991
3 changed files with 4 additions and 2 deletions

View File

@@ -1342,7 +1342,7 @@ class Connection {
else
buf.append(" to ");
if (_remotePeer != null)
buf.append(_remotePeer.calculateHash().toBase64().substring(0,4));
buf.append(_remotePeer.toBase32());
else
buf.append("unknown");
buf.append(" up ").append(DataHelper.formatDuration(_context.clock().now() - _createdOn));

View File

@@ -50,6 +50,7 @@ class ConnectionPacketHandler {
boolean ok = verifyPacket(packet, con);
if (!ok) {
boolean isTooFast = con.getSendStreamId() <= 0;
// Apparently an i2pd bug... see verifyPacket()
if ( (!packet.isFlagSet(Packet.FLAG_RESET)) && (!isTooFast) && (_log.shouldLog(Log.WARN)) )
_log.warn("Packet does NOT verify: " + packet + " on " + con);
packet.releasePayload();
@@ -543,7 +544,7 @@ class ConnectionPacketHandler {
}
}
} else {
// getting a lot of these - why? mostly/all for acks...
// Apparently an i2pd bug...
if (con.getSendStreamId() != packet.getReceiveStreamId()) {
if (_log.shouldLog(Log.WARN))
_log.warn("Packet received with the wrong reply stream id: "

View File

@@ -191,6 +191,7 @@ class PacketHandler {
} else if (oldId == packet.getReceiveStreamId()) {
// ok, as expected...
} else {
// Apparently an i2pd bug...
if (_log.shouldLog(Log.WARN))
_log.warn("Received a syn with the wrong IDs, con=" + con + " packet=" + packet);
sendReset(packet);