BugID:23823350: add MBEDTLS_ERR_SSL_WANT_READ handle in receive response
@@ -1789,12 +1789,16 @@ int httpclient_recv(httpclient_t *client, char *buf, int min_len, int max_len, i
/* read already complete */
/* if call mbedtls_ssl_read again, it will return 0 (means EOF) */
}
+
+ if (MBEDTLS_ERR_SSL_WANT_READ == ret) {
+ continue;
}
+
if (ret == MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY) {/* read already complete(if call mbedtls_ssl_read again, it will return 0(eof)) */
- //break;
ret = HTTP_ECLSD;
}
}
+ }
#endif
if (ret > 0) {
