mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
9b2b86b7d9
Fixes a regression from 753a92952: if cb was negative, read_bytes overflowed, because the type was changed from int to size_t. Also fixes incorrect timeout calculation: timeout_ms was 200, but each iteration delayed for 10ms, and reduced timeout_ms by 1. This made the effective timeout to be 2000ms.