mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 23:53:32 +01:00
Don't yell loudly about failed internal/bridge connections. These
are reachability testing and rendserv upload/downloads, and they have their own failure messages elsewhere. svn:r6343
This commit is contained in:
parent
b6b534c9dd
commit
21263982e4
@ -1136,6 +1136,7 @@ connection_ap_handshake_attach_circuit(connection_t *conn)
|
||||
{
|
||||
int retval;
|
||||
int conn_age;
|
||||
int severity;
|
||||
|
||||
tor_assert(conn);
|
||||
tor_assert(conn->type == CONN_TYPE_AP);
|
||||
@ -1143,8 +1144,9 @@ connection_ap_handshake_attach_circuit(connection_t *conn)
|
||||
tor_assert(conn->socks_request);
|
||||
|
||||
conn_age = time(NULL) - conn->timestamp_created;
|
||||
severity = (!conn->addr && !conn->port) ? LOG_INFO : LOG_NOTICE;
|
||||
if (conn_age > get_options()->SocksTimeout) {
|
||||
log_notice(LD_APP,
|
||||
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);
|
||||
|
@ -326,6 +326,7 @@ connection_ap_expire_beginning(void)
|
||||
int n, i;
|
||||
time_t now = time(NULL);
|
||||
or_options_t *options = get_options();
|
||||
int severity;
|
||||
|
||||
get_connection_array(&carray, &n);
|
||||
|
||||
@ -333,9 +334,11 @@ connection_ap_expire_beginning(void)
|
||||
conn = carray[i];
|
||||
if (conn->type != CONN_TYPE_AP)
|
||||
continue;
|
||||
/* if it's an internal bridge connection, don't yell its status. */
|
||||
severity = (!conn->addr && !conn->port) ? LOG_INFO : LOG_NOTICE;
|
||||
if (conn->state == AP_CONN_STATE_CONTROLLER_WAIT) {
|
||||
if (now - conn->timestamp_lastread >= options->SocksTimeout) {
|
||||
log_notice(LD_APP, "Closing unattached stream.");
|
||||
log_fn(severity, LD_APP, "Closing unattached stream.");
|
||||
connection_mark_unattached_ap(conn, END_STREAM_REASON_TIMEOUT);
|
||||
}
|
||||
continue;
|
||||
@ -355,7 +358,7 @@ connection_ap_expire_beginning(void)
|
||||
}
|
||||
if (circ->purpose == CIRCUIT_PURPOSE_C_REND_JOINED) {
|
||||
if (now - conn->timestamp_lastread > options->SocksTimeout) {
|
||||
log_notice(LD_REND,
|
||||
log_fn(severity, LD_REND,
|
||||
"Rend stream is %d seconds late. Giving up on address"
|
||||
" '%s.onion'.",
|
||||
(int)(now - conn->timestamp_lastread),
|
||||
@ -368,7 +371,7 @@ connection_ap_expire_beginning(void)
|
||||
}
|
||||
tor_assert(circ->purpose == CIRCUIT_PURPOSE_C_GENERAL);
|
||||
nickname = build_state_get_exit_nickname(circ->build_state);
|
||||
log_notice(LD_APP,
|
||||
log_fn(severity, LD_APP,
|
||||
"We tried for %d seconds to connect to '%s' using exit '%s'."
|
||||
" Retrying on a new circuit.",
|
||||
(int)(now - conn->timestamp_lastread),
|
||||
|
Loading…
Reference in New Issue
Block a user