From 06be8bc3894f332f7e7ab77095aa4bdd3d5b16a4 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Thu, 4 Oct 2007 02:09:33 +0000 Subject: On error, close "log/server.response" --- tests/server/sws.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/server/sws.c') diff --git a/tests/server/sws.c b/tests/server/sws.c index 65b81a4c0..2f429edeb 100644 --- a/tests/server/sws.c +++ b/tests/server/sws.c @@ -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; } -- cgit v1.2.3