Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
vis2k committed Oct 22, 2020
1 parent 0b7bdec commit d2e6d06
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kcp2k/Assets/kcp2k/kcp/Kcp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,10 @@ public int Send(byte[] buffer, int offset, int len)
if (len <= mss) count = 1;
else count = (int)((len + mss - 1) / mss);

// this might be a kcp bug.
// it's possible that we should check 'count >= rcv_wnd' instead of
// the constant here.
// see also: https://github.com/skywind3000/kcp/pull/291/files
if (count >= WND_RCV) return -2;

if (count == 0) count = 1;
Expand Down

0 comments on commit d2e6d06

Please sign in to comment.