wolfssl: when SSL_read() returns zero, check the error
Returning zero indicates end of connection, so if there's no data read but the connection is alive, it needs to return -1 with CURLE_AGAIN. Closes #8431
This commit is contained in:
parent
96f85a0fef
commit
327ef30530
@ -917,7 +917,7 @@ static ssize_t wolfssl_recv(struct Curl_easy *data,
|
||||
|
||||
nread = SSL_read(backend->handle, buf, buffsize);
|
||||
|
||||
if(nread < 0) {
|
||||
if(nread <= 0) {
|
||||
int err = SSL_get_error(backend->handle, nread);
|
||||
|
||||
switch(err) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user