mirror of https://github.com/m-labs/artiq.git
Rust: liblwip: call tcp_recved where appropriate.
This commit is contained in:
parent
fdadf550fb
commit
9562d8d1df
|
@ -505,7 +505,10 @@ impl TcpStream {
|
||||||
Some(_) => ()
|
Some(_) => ()
|
||||||
}
|
}
|
||||||
match state.recv_buffer.pop_front() {
|
match state.recv_buffer.pop_front() {
|
||||||
Some(Ok(pbuf)) => return Ok(Some(pbuf)),
|
Some(Ok(pbuf)) => {
|
||||||
|
unsafe { lwip_sys::tcp_recved(self.raw, pbuf.len() as u16) }
|
||||||
|
return Ok(Some(pbuf))
|
||||||
|
},
|
||||||
_ => unreachable!()
|
_ => unreachable!()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue