request: paused upload on completed download, assess connection

A transfer with a completed download that is still uploading needs to
check the connection state when it is PAUSEd, since connection
close/errors would otherwise go unnoticed.

Reported-by: Sergey Bronnikov
Fixes #13260
Closes #13271
This commit is contained in:
Stefan Eissing 2024-04-03 13:18:01 +02:00 committed by Daniel Stenberg
parent d5e83eb745
commit cfc65fd1ee
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
7 changed files with 321 additions and 8 deletions

View file

@ -395,6 +395,7 @@ CURLcode Curl_req_send_more(struct Curl_easy *data)
result = req_flush(data);
if(result == CURLE_AGAIN)
result = CURLE_OK;
return result;
}

View file

@ -272,10 +272,9 @@ static CURLcode readwrite_data(struct Curl_easy *data,
DEBUGF(infof(data, "nread == 0, stream closed, bailing"));
else
DEBUGF(infof(data, "nread <= 0, server closed connection, bailing"));
if(k->eos_written) { /* already did write this to client, leave */
k->keepon = 0; /* stop sending as well */
k->keepon = 0; /* stop sending as well */
if(k->eos_written) /* already did write this to client, leave */
break;
}
}
total_received += blen;