sharandac / My-TTGO-Watch

A GUI named hedge for smartwatch like devices based on ESP32. Currently support for T-Watch2020 (V1,V2,V3), T-Watch2021, M5Paper, M5Core2 and native Linux support for testing.
GNU General Public License v2.0
523 stars 247 forks source link

Infinite loop..? #360

Closed asdf23 closed 2 years ago

asdf23 commented 2 years ago

https://github.com/sharandac/My-TTGO-Watch/blob/6b00fe68746ef01406243af5a57c26ba3f1905a3/src/utils/uri_load/uri_load.cpp#L406

I've been adding more debugging and found an infinite loop. Where's what I'm seeing:

image

sharandac commented 2 years ago

Thank you for your feedback. The loop is terminated when the connection times out and no bytes left to receive ( connection AND bytes left > 0 ). The inner condition checks if bytes are left in the stream buffer. This can take a while. See ...

https://github.com/sharandac/My-TTGO-Watch/blob/6b00fe68746ef01406243af5a57c26ba3f1905a3/src/utils/uri_load/uri_load.cpp#L378