Fix an inaccurate comment.
This commit is contained in:
parent
ca1146995f
commit
4267ad2635
|
@ -509,8 +509,9 @@ impl<'a> TcpSocket<'a> {
|
||||||
/// there are not enough octets queued in the receive buffer, down to
|
/// there are not enough octets queued in the receive buffer, down to
|
||||||
/// an empty slice.
|
/// an empty slice.
|
||||||
pub fn recv(&mut self, size: usize) -> Result<&[u8], ()> {
|
pub fn recv(&mut self, size: usize) -> Result<&[u8], ()> {
|
||||||
// We may have received some data inside the initial SYN ("TCP Fast Open"),
|
// We may have received some data inside the initial SYN, but until the connection
|
||||||
// but until the connection is fully open we refuse to dequeue any data.
|
// is fully open we must not dequeue any data, as it may be overwritten by e.g.
|
||||||
|
// another (stale) SYN.
|
||||||
if !self.may_recv() { return Err(()) }
|
if !self.may_recv() { return Err(()) }
|
||||||
|
|
||||||
#[cfg(any(test, feature = "verbose"))]
|
#[cfg(any(test, feature = "verbose"))]
|
||||||
|
|
Loading…
Reference in New Issue