forked from I2P_Developers/i2p.i2p
streaming debug log tweak and notes on ID mismatch
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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: "
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user