From 6d4c8e61d38fbe6aa6bb00a4b9262656ea39545b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 26 Jun 2017 12:16:47 +0530 Subject: [PATCH] End send optimization before resetting connection state --- src/calibre/srv/http_response.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/srv/http_response.py b/src/calibre/srv/http_response.py index 26f36d861f..8c62f27493 100644 --- a/src/calibre/srv/http_response.py +++ b/src/calibre/srv/http_response.py @@ -608,9 +608,9 @@ class HTTPConnection(HTTPRequest): def reset_state(self): ready = not self.close_after_response + self.end_send_optimization() self.connection_ready() self.ready = ready - self.end_send_optimization() def report_unhandled_exception(self, e, formatted_traceback): self.simple_response(httplib.INTERNAL_SERVER_ERROR)