mirror of
https://github.com/curl/curl.git
synced 2026-06-27 21:43:16 +03:00
On error, close "log/server.response"
This commit is contained in:
parent
0ac5fd354b
commit
06be8bc389
1 changed files with 2 additions and 1 deletions
|
|
@ -711,11 +711,12 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
|
|||
/* Ok, we send no more than 200 bytes at a time, just to make sure that
|
||||
larger chunks are split up so that the client will need to do multiple
|
||||
recv() calls to get it and thus we exercise that code better */
|
||||
int num = count;
|
||||
size_t num = count;
|
||||
if(num > 200)
|
||||
num = 200;
|
||||
written = swrite(sock, buffer, num);
|
||||
if (written < 0) {
|
||||
fclose(dump);
|
||||
logmsg("Sending response failed and we bailed out!");
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue