From 8136f9270f9f13454d95f39e947ebbae068eb6a2 Mon Sep 17 00:00:00 2001 From: Nicolas Favre-Felix Date: Tue, 2 Aug 2011 22:18:06 +0100 Subject: [PATCH] Fixed keep-alive issue --- http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http.c b/http.c index 955e91f..05efd33 100644 --- a/http.c +++ b/http.c @@ -83,7 +83,7 @@ http_response_cleanup(struct http_response *r, int fd, int success) { /* cleanup buffer */ free(r->out); - if(!r->keep_alive && !success) { + if(!r->keep_alive || !success) { /* Close fd is client doesn't support Keep-Alive. */ close(fd); }