]> git.sesse.net Git - nageru/commitdiff
Log a warning when we kill a client that is not keeping up.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 25 Feb 2020 22:02:49 +0000 (23:02 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 25 Feb 2020 22:02:49 +0000 (23:02 +0100)
shared/httpd.cpp

index a881919cace1abd5e2399a192f60416f39ac6dc7..09c065693f005dbcd137b95f1ade099f387a27e5 100644 (file)
@@ -260,6 +260,7 @@ void HTTPD::Stream::add_data(const char *buf, size_t buf_size, HTTPD::Stream::Da
                // so kill it instead of going out of memory. Note that this
                // won't kill the client immediately, but will cause the next callback
                // to kill the client.
+               fprintf(stderr, "HTTP client had more than 1 GB backlog; killing.\n");
                should_quit = true;
                buffered_data.clear();
                has_buffered_data.notify_all();