Handle the BIO want read in BioReceive.
This commit is contained in:
parent
5c762afb94
commit
072e6e010c
@ -264,12 +264,6 @@ int wolfSSL_BIO_read(WOLFSSL_BIO* bio, void* buf, int len)
|
||||
if (ret > 0) {
|
||||
sz = ret; /* adjust size for formatting */
|
||||
}
|
||||
else {
|
||||
if (wolfSSL_BIO_supports_pending(bio) &&
|
||||
wolfSSL_BIO_ctrl_pending(bio) == 0) {
|
||||
ret = WOLFSSL_CBIO_ERR_WANT_READ;
|
||||
}
|
||||
}
|
||||
|
||||
/* previous WOLFSSL_BIO in list working towards head of list */
|
||||
bio = bio->prev;
|
||||
|
@ -135,7 +135,11 @@ int BioReceive(WOLFSSL* ssl, char* buf, int sz, void* ctx)
|
||||
|
||||
recvd = wolfSSL_BIO_read(ssl->biord, buf, sz);
|
||||
if (recvd <= 0) {
|
||||
if (ssl->biord->type == WOLFSSL_BIO_SOCKET) {
|
||||
if (wolfSSL_BIO_supports_pending(ssl->biord) &&
|
||||
wolfSSL_BIO_ctrl_pending(ssl->biord) == 0) {
|
||||
return WOLFSSL_CBIO_ERR_WANT_READ;
|
||||
}
|
||||
else if (ssl->biord->type == WOLFSSL_BIO_SOCKET) {
|
||||
int err;
|
||||
|
||||
if (recvd == 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user