Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
While testing I ran into a situation where a read was returning -1 signaling an error, but the socket error was 0. This then triggered an assertion failure in LiteCore. mbedTLS was returning the code MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY, which our `translate_mbed_error` method converts to errno 0, i.e. it's not an error at our level. However, `check_mbed_io` still returned -1. Fixed by making `check_mbed_io` return 0, not -1, if the error code translates to 0.
- Loading branch information