Skip to content

Commit 4824c26

Browse files
author
mischa
committed
ParseFastack: simplified
1 parent bdbaeb9 commit 4824c26

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

kcp2k/Assets/kcp2k/kcp/Kcp.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,10 @@ internal void ParseUna(uint una)
412412
// ikcp_parse_fastack
413413
void ParseFastack(uint sn, uint ts) // serial number, timestamp
414414
{
415-
if (Utils.TimeDiff(sn, snd_una) < 0 || Utils.TimeDiff(sn, snd_nxt) >= 0)
415+
if (Utils.TimeDiff(sn, snd_una) < 0)
416+
return;
417+
418+
if (Utils.TimeDiff(sn, snd_nxt) >= 0)
416419
return;
417420

418421
foreach (Segment seg in snd_buf)

0 commit comments

Comments
 (0)