We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b63a96 commit 4624417Copy full SHA for 4624417
kcp.go
@@ -727,7 +727,6 @@ func (kcp *KCP) flush(ackOnly bool) uint32 {
727
kcp.snd_buf = append(kcp.snd_buf, newseg)
728
kcp.snd_nxt++
729
newSegsCount++
730
- kcp.snd_queue[k].data = nil
731
}
732
if newSegsCount > 0 {
733
kcp.snd_queue = kcp.remove_front(kcp.snd_queue, newSegsCount)
@@ -1008,9 +1007,5 @@ func (kcp *KCP) WaitSnd() int {
1008
1007
// remove front n elements from queue
1009
func (kcp *KCP) remove_front(q []segment, n int) []segment {
1010
newn := copy(q, q[n:])
1011
- gc := q[newn:]
1012
- for k := range gc {
1013
- gc[k].data = nil // de-ref data
1014
- }
1015
return q[:newn]
1016
0 commit comments