Skip to content

Conversation

MarkusAD
Copy link
Contributor

@MarkusAD MarkusAD commented Jan 21, 2020

WiFiClient.connected() was hanging thinking there was still a connection when the remote had already closed. The one-liner in this patch addresses recv() returning 0 and errno==128. I couldn't find the corresponding errno for 128 but its caught by the case statement which includes EPIPE, ENOTCONN, ECONNRESET and ECONNABORTED so I assume its one of those. Broken pipe maybe?

[D][WiFiClient.cpp:511] connected(): Disconnected: RES: 0, ERR: 128

EDIT: added comment to reflect that recv() can set errno when it returns 0.

@me-no-dev me-no-dev merged commit bb0a194 into espressif:master Jan 21, 2020
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.

2 participants