output/httpd: move queue size check to HttpdClient::PushPage()

Don't let the server care for client problems.
This commit is contained in:
Max Kellermann
2014-01-04 17:42:03 +01:00
parent 8e4efd071e
commit 68fcc19565
3 changed files with 6 additions and 18 deletions

View File

@@ -387,6 +387,12 @@ HttpdClient::PushPage(Page *page)
/* the client is still writing the HTTP request */
return;
if (queue_size > 256 * 1024) {
FormatDebug(httpd_output_domain,
"client is too slow, flushing its queue");
ClearQueue();
}
page->Ref();
pages.push(page);
queue_size += page->size;