diff --git a/sess.go b/sess.go index 98176e6..b807fec 100644 --- a/sess.go +++ b/sess.go @@ -207,7 +207,7 @@ func (s *UDPSession) Write(b []byte) (n int, err error) { } } - if s.kcp.WaitSnd() < int(s.kcp.snd_wnd) { + if s.kcp.WaitSnd() < int(s.kcp.Cwnd()) { n = len(b) max := s.kcp.mss << 8 for {