MbedTLS: Use correct error code for failed socket writes
This should make writing more efficient.
This commit is contained in:
parent
0db0805ed5
commit
be31ac33d5
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
int ret = (int) write(F->fd, buf, count);
|
||||||
|
|
||||||
if(ret < 0 && rb_ignore_errno(errno))
|
if(ret < 0 && rb_ignore_errno(errno))
|
||||||
return MBEDTLS_ERR_SSL_WANT_READ;
|
return MBEDTLS_ERR_SSL_WANT_WRITE;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue