Skip to content

Commit

Permalink
Respect the configured receive window skywind3000#291
Browse files Browse the repository at this point in the history
  • Loading branch information
sh4k3n committed Nov 30, 2021
1 parent 27a0451 commit 6c8ee36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ikcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ int ikcp_send(ikcpcb *kcp, const char *buffer, int len)
if (len <= (int)kcp->mss) count = 1;
else count = (len + kcp->mss - 1) / kcp->mss;

if (count >= (int)IKCP_WND_RCV) return -2;
if (count >= (int)kcp->rcv_wnd) return -2;

if (count == 0) count = 1;

Expand Down

0 comments on commit 6c8ee36

Please sign in to comment.