Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Http download issue when connection lost #723

Merged
merged 2 commits into from
Jun 23, 2019

Conversation

junioteixeira
Copy link
Contributor

@junioteixeira junioteixeira commented Jun 12, 2019

I was testing HTTP OTA and I realized that OTA locks down when Wifi connection drops. When this happens, POSIX function read (located at HttpClient_download) returns -1. Since it's implemented as unsigned, do { ... } while(read_byte > 0) loops forever. Therefore the read_byte variable must be signed type.

When the socket down the "read" function returns -1.
Then the while(read_byte > 0) only works for signed types.
@kanflo kanflo merged commit d02b40d into SuperHouse:master Jun 23, 2019
@kanflo
Copy link
Contributor

kanflo commented Jun 23, 2019

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants