Skip to content

removing log #2140

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

Merged
merged 2 commits into from
Dec 3, 2018
Merged

removing log #2140

merged 2 commits into from
Dec 3, 2018

Conversation

luc-github
Copy link
Contributor

@luc-github luc-github commented Dec 2, 2018

fix #2139

@bertmelis
Copy link
Contributor

bertmelis commented Dec 2, 2018

My opinion about this PR:

I did some digging after receiving numerous messages during an OTA (using the repo example).
After some digging I think I found a possible cause: OTA calls WiFiClient::connected() repeatedly. The implementation uses recv() from sockets.h and in the docs I read this:

Upon successful completion, recv() returns the length of the message in bytes. If no messages are available to be received and the peer has performed an orderly shutdown, recv() returns 0. Otherwise, -1 is returned and errno is set to indicate the error.

So it returns -1 because no data is available but the socket is still connected. So it signals an error which isn't a real error. Hence, reporting res < 0 as an error doesn't make sense and should be deleted as in this PR. Furthermore, should there be an error, it is reported in the lines below.

(no opinion about BSSID change)

@me-no-dev me-no-dev merged commit 5cfff19 into espressif:master Dec 3, 2018
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.

WiFiClient error [WiFiClient.cpp:443] connected(): RES: -1
3 participants