• M
    fix WiFiClient.connected() (#3654) · bb0a194b
    Mark D 提交于
    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?
    ```c
    [D][WiFiClient.cpp:511] connected(): Disconnected: RES: 0, ERR: 128
    ```
    EDIT: added comment to reflect that recv() can set errno when it returns 0.
    bb0a194b
WiFiClient.cpp 14.9 KB