mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04: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
@ -404,7 +404,9 @@ class HTTPRequest(Connection):
|
|||||||
self.set_state(READ, self.read_chunk_length, inheaders, Accumulator(), buf, bytes_read)
|
self.set_state(READ, self.read_chunk_length, inheaders, Accumulator(), buf, bytes_read)
|
||||||
|
|
||||||
def handle_timeout(self):
|
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
|
return False
|
||||||
self.simple_response(http_client.REQUEST_TIMEOUT)
|
self.simple_response(http_client.REQUEST_TIMEOUT)
|
||||||
return True
|
return True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user