MbedTLS: Use correct error code for failed socket writes

This should make writing more efficient.
This commit is contained in:
Aaron Jones 2016-09-02 00:28:17 +00:00
parent 0db0805ed5
commit be31ac33d5

View file

@ -752,7 +752,7 @@ rb_sock_net_xmit(void *const context_ptr, const unsigned char *const buf, size_t
int ret = (int) write(F->fd, buf, count);
if(ret < 0 && rb_ignore_errno(errno))
return MBEDTLS_ERR_SSL_WANT_READ;
return MBEDTLS_ERR_SSL_WANT_WRITE;
return ret;
}