Skip to content

Commit 34c2fb0

Browse files
committed
fix: fix the condition of sending count
1 parent b7cf72c commit 34c2fb0

File tree

1 file changed

+2
-2
lines changed
  • kcp-netty/src/main/java/io/jpower/kcp/netty

1 file changed

+2
-2
lines changed

kcp-netty/src/main/java/io/jpower/kcp/netty/Kcp.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ public int send(ByteBuf buf) {
545545
count = (len + mss - 1) / mss;
546546
}
547547

548-
if (count >= IKCP_WND_RCV) { // Maybe don't need the conditon in stream mode
548+
if (!stream && count > 255) { // Maybe don't need the conditon in stream mode
549549
return -2;
550550
}
551551

@@ -1027,7 +1027,7 @@ private void flush() {
10271027
if (log.isDebugEnabled()) {
10281028
log.debug("{} fastresend. sn={}, xmit={}, resendts={} ", this, segment.sn, segment.xmit,
10291029
(segment
1030-
.resendts - current));
1030+
.resendts - current));
10311031
}
10321032
}
10331033
}

0 commit comments

Comments
 (0)