Move erroneously placed comment in UDP endpoint

PiperOrigin-RevId: 432261816
This commit is contained in:
Nick Brown
2022-03-03 12:57:58 -08:00
committed by gVisor bot
parent 8174aec84e
commit 15898a341f
+2 -1
View File
@@ -922,7 +922,7 @@ func (e *endpoint) HandlePacket(id stack.TransportEndpointID, pkt *stack.PacketB
e.stats.PacketsReceived.Increment()
e.rcvMu.Lock()
// Drop the packet if our buffer is currently full.
// Drop the packet if our buffer is not ready to receive packets.
if !e.rcvReady || e.rcvClosed {
e.rcvMu.Unlock()
e.stack.Stats().UDP.ReceiveBufferErrors.Increment()
@@ -931,6 +931,7 @@ func (e *endpoint) HandlePacket(id stack.TransportEndpointID, pkt *stack.PacketB
}
rcvBufSize := e.ops.GetReceiveBufferSize()
// Drop the packet if our buffer is currently full.
if e.frozen || e.rcvBufSize >= int(rcvBufSize) {
e.rcvMu.Unlock()
e.stack.Stats().UDP.ReceiveBufferErrors.Increment()