mirror of https://github.com/status-im/nim-eth.git
Differentiate log for invalid packet seqnr without reorder buffer and not (#723)
This commit is contained in:
parent
98b2a34075
commit
b874e12516
|
@ -1212,9 +1212,7 @@ proc processPacketInternal(socket: UtpSocket, p: Packet) =
|
||||||
# with a todo. Currently the reference implementation is follow and packets
|
# with a todo. Currently the reference implementation is follow and packets
|
||||||
# are not resend in this case.
|
# are not resend in this case.
|
||||||
|
|
||||||
debug "Packet state variables",
|
debug "Packet state variables", pastExpected, acks
|
||||||
pastExpected = pastExpected,
|
|
||||||
acks = acks
|
|
||||||
|
|
||||||
# If packet is totally off the mark, short-circuit the processing
|
# If packet is totally off the mark, short-circuit the processing
|
||||||
if pastExpected >= reorderBufferMaxSize:
|
if pastExpected >= reorderBufferMaxSize:
|
||||||
|
@ -1230,10 +1228,11 @@ proc processPacketInternal(socket: UtpSocket, p: Packet) =
|
||||||
pastExpected >= (int(uint16.high) + 1) - reorderBufferMaxSize
|
pastExpected >= (int(uint16.high) + 1) - reorderBufferMaxSize
|
||||||
|
|
||||||
if (isPossibleDuplicatedOldPacket and p.header.pType != ST_STATE):
|
if (isPossibleDuplicatedOldPacket and p.header.pType != ST_STATE):
|
||||||
|
debug "Invalid packet sequence number, within reorder buffer",
|
||||||
|
pastExpected
|
||||||
socket.sendAck()
|
socket.sendAck()
|
||||||
|
else:
|
||||||
debug "Got an invalid packet sequence number, too far off",
|
debug "Invalid packet sequence number, too far off", pastExpected
|
||||||
pastExpected = pastExpected
|
|
||||||
return
|
return
|
||||||
|
|
||||||
var (ackedBytes, minRtt) =
|
var (ackedBytes, minRtt) =
|
||||||
|
|
Loading…
Reference in New Issue