浏览代码

correct window calculation

v2ray 9 年之前
父节点
当前提交
5a5c9b891d
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      transport/internet/kcp/kcp.go

+ 1 - 1
transport/internet/kcp/kcp.go

@@ -550,7 +550,7 @@ func (kcp *KCP) flush() {
 
 	// calculate window size
 
-	cwnd := _imin_(kcp.snd_nxt+kcp.snd_wnd, kcp.rmt_wnd)
+	cwnd := _imin_(kcp.snd_una+kcp.snd_wnd, kcp.rmt_wnd)
 	if kcp.congestionControl {
 		cwnd = _imin_(kcp.cwnd, cwnd)
 	}