mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-21 10:26:06 +03:00
add null prt check to _pcb in flush
This commit is contained in:
parent
96ec8e480b
commit
ea7a4e522a
@ -162,11 +162,12 @@ public:
|
|||||||
|
|
||||||
void flush()
|
void flush()
|
||||||
{
|
{
|
||||||
if (!_rx_buf)
|
if(!_rx_buf) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
size_t len = _rx_buf->tot_len;
|
if(_pcb) {
|
||||||
tcp_recved(_pcb, len);
|
tcp_recved(_pcb, (size_t) _rx_buf->tot_len);
|
||||||
|
}
|
||||||
pbuf_free(_rx_buf);
|
pbuf_free(_rx_buf);
|
||||||
_rx_buf = 0;
|
_rx_buf = 0;
|
||||||
_rx_buf_offset = 0;
|
_rx_buf_offset = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user