mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-04 10:59:06 +01:00
Dont spam server log with errors when timing out connections that never even get ready
This commit is contained in:
parent
228453fb48
commit
52750191f1
1 changed files with 3 additions and 1 deletions
|
|
@ -404,7 +404,9 @@ def read_chunk_separator(self, inheaders, line_buf, buf, bytes_read, event, last
|
|||
self.set_state(READ, self.read_chunk_length, inheaders, Accumulator(), buf, bytes_read)
|
||||
|
||||
def handle_timeout(self):
|
||||
if self.response_started:
|
||||
if not hasattr(self, 'response_protocol') or self.response_started:
|
||||
# Either connection is not ready or a response has already bee
|
||||
# started
|
||||
return False
|
||||
self.simple_response(http_client.REQUEST_TIMEOUT)
|
||||
return True
|
||||
|
|
|
|||
Loading…
Reference in a new issue