netstack/tcp: fix calculating a number of outstanding packets

In case of GSO, a segment can container more than one packet
and we need to use the pCount() helper to get a number of packets.

PiperOrigin-RevId: 251743020
This commit is contained in:
Andrei Vagin
2019-06-05 16:30:45 -07:00
committed by Shentubot
parent d18bb4f38a
commit a12848ffeb
+1 -1
View File
@@ -779,7 +779,7 @@ func (s *sender) sendData() {
break
}
dataSent = true
s.outstanding++
s.outstanding += s.pCount(seg)
s.writeNext = seg.Next()
}
}