FAQ: Add a link to the TODO list
[privoxy.git] / jcc.c
diff --git a/jcc.c b/jcc.c
index 2389a8d..0654f80 100644 (file)
--- a/jcc.c
+++ b/jcc.c
@@ -3889,10 +3889,14 @@ static void chat(struct client_state *csp)
              */
             if (!tunnel_established_successfully(server_response, (unsigned int)len))
             {
-               log_error(LOG_LEVEL_ERROR, "Forwarder hasn't established "
-                  "connection with destination server.");
-
-               write_socket(csp->cfd, server_response, (size_t)len);
+               log_error(LOG_LEVEL_ERROR,
+                  "The forwarder %s failed to establish a connection with %s",
+                  fwd->forward_host, http->host);
+               rsp = error_response(csp, "connect-failed");
+               if (rsp)
+               {
+                  send_crunch_response(csp, rsp);
+               }
                mark_server_socket_tainted(csp);
                close_client_ssl_connection(csp);
                return;