From: Fabian Keil <fk@fabiankeil.de>
Date: Fri, 27 Mar 2015 12:40:08 +0000 (+0000)
Subject: listen_loop(): Add number of active threads to a couple of log messages
X-Git-Tag: v_3_0_24~102
X-Git-Url: http://www.privoxy.org/gitweb/%22https:/faq/@default-cgi@/static/@proxy-info-url@?a=commitdiff_plain;h=0cee0fddf51d8a5452d4aff25ae420c89a85f07f;p=privoxy.git

listen_loop(): Add number of active threads to a couple of log messages
---

diff --git a/jcc.c b/jcc.c
index 00c92c1f..5223c5e9 100644
--- a/jcc.c
+++ b/jcc.c
@@ -1,4 +1,4 @@
-const char jcc_rcs[] = "$Id: jcc.c,v 1.434 2015/01/24 16:41:20 fabiankeil Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 1.435 2015/01/24 16:42:57 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/jcc.c,v $
@@ -3934,7 +3934,9 @@ static void listen_loop(void)
       }
       csp = &csp_list->csp;
 
-      log_error(LOG_LEVEL_CONNECT, "Listening for new connections ... ");
+      log_error(LOG_LEVEL_CONNECT,
+         "Waiting for the next client connection. Currently active threads: %d",
+         active_threads);
 
       if (!accept_connection(csp, bfds))
       {
@@ -4188,7 +4190,8 @@ static void listen_loop(void)
              * XXX: If you assume ...
              */
             log_error(LOG_LEVEL_ERROR,
-               "Unable to take any additional connections: %E");
+               "Unable to take any additional connections: %E. Active threads: %d",
+               active_threads);
             write_socket(csp->cfd, TOO_MANY_CONNECTIONS_RESPONSE,
                strlen(TOO_MANY_CONNECTIONS_RESPONSE));
             close_socket(csp->cfd);