Merge pull request #8911 from c1728p9/esp8266_flow_control_fix

Fix ESP8266 recv_udp timeout with flow control
pull/8946/head
Martin Kojtal 2018-12-03 13:41:23 +01:00 committed by GitHub
commit b52c164028
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -763,10 +763,9 @@ int32_t ESP8266::recv_udp(int id, void *data, uint32_t amount, uint32_t timeout)
_smutex.lock();
set_timeout(timeout);
// No flow control, drain the USART receive register ASAP to avoid data overrun
if (_serial_rts == NC) {
_process_oob(timeout, true);
}
// Process OOB data since this is
// how UDP packets are received
_process_oob(timeout, true);
set_timeout();