summaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@gmail.com>2011-06-14 02:51:59 +0200
committerGeorge Kadianakis <desnacked@gmail.com>2011-06-14 02:51:59 +0200
commita79bea40d84fd369ef4df950765afc4c635f9b31 (patch)
tree711a80ae2de2c1cab591d0cb6d562b0e54e42ee4 /src/or/main.c
parent00ec4b2c002928f1a901950e2cc851578f295b1b (diff)
downloadtor-a79bea40d84fd369ef4df950765afc4c635f9b31.tar.gz
tor-a79bea40d84fd369ef4df950765afc4c635f9b31.zip
We now warn the user if a proxy server is not up when we try to connect with it.
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c
index bb56be7c94..09d35ed46f 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -757,6 +757,16 @@ conn_close_if_marked(int i)
#endif
log_debug(LD_NET,"Cleaning up connection (fd %d).",conn->s);
+
+ /* If the connection we are about to close was trying to connect to
+ a proxy server and failed, the client won't be able to use that
+ proxy. We should warn him about this. */
+ if (conn->proxy_state == PROXY_INFANT) {
+ log_warn(LD_NET,
+ "The connection to a configured proxy server just failed. "
+ "Make sure that the proxy server is up and running.");
+ }
+
IF_HAS_BUFFEREVENT(conn, goto unlink);
if ((SOCKET_OK(conn->s) || conn->linked_conn) &&
connection_wants_to_flush(conn)) {