diff options
author | Roger Dingledine <arma@torproject.org> | 2007-08-19 07:23:54 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2007-08-19 07:23:54 +0000 |
commit | 0153b6b20e4fe0f2ad20324cd4a3f7ea1d65d4fc (patch) | |
tree | 11a02a03f023a3977de5c5efa84d00a6810ec303 /src | |
parent | 07d9dc945b427efc650ca41f5d23915bc7d4202c (diff) | |
download | tor-0153b6b20e4fe0f2ad20324cd4a3f7ea1d65d4fc.tar.gz tor-0153b6b20e4fe0f2ad20324cd4a3f7ea1d65d4fc.zip |
backport r11186
svn:r11188
Diffstat (limited to 'src')
-rw-r--r-- | src/or/circuituse.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c index b145474079..b4f1d00496 100644 --- a/src/or/circuituse.c +++ b/src/or/circuituse.c @@ -1215,6 +1215,16 @@ connection_ap_handshake_attach_circuit(edge_connection_t *conn) conn_age = time(NULL) - conn->_base.timestamp_created; + if (conn_age >= get_options()->SocksTimeout) { + int severity = (!conn->_base.addr && !conn->_base.port) ? + LOG_INFO : LOG_NOTICE; + log_fn(severity, LD_APP, + "Tried for %d seconds to get a connection to %s:%d. Giving up.", + conn_age, safe_str(conn->socks_request->address), + conn->socks_request->port); + return -1; + } + if (!connection_edge_is_rendezvous_stream(conn)) { /* we're a general conn */ origin_circuit_t *circ=NULL; |