Loading src/or/circuituse.c +1 −4 Original line number Diff line number Diff line Loading @@ -13,9 +13,6 @@ const char circuituse_c_id[] = #include "or.h" /** Longest time to wait for a circuit before closing an AP connection */ #define CONN_AP_MAX_ATTACH_DELAY 59 /********* START VARIABLES **********/ extern circuit_t *global_circuitlist; /* from circuitlist.c */ Loading Loading @@ -1154,7 +1151,7 @@ connection_ap_handshake_attach_circuit(connection_t *conn) tor_assert(conn->socks_request); conn_age = time(NULL) - conn->timestamp_created; if (conn_age > CONN_AP_MAX_ATTACH_DELAY) { if (conn_age > get_options()->SocksTimeout) { log_notice(LD_APP, "Tried for %d seconds to get a connection to %s:%d. Giving up.", conn_age, safe_str(conn->socks_request->address), Loading src/or/config.c +1 −0 Original line number Diff line number Diff line Loading @@ -223,6 +223,7 @@ static config_var_t _option_vars[] = { VAR("SocksListenAddress", LINELIST, SocksListenAddress, NULL), VAR("SocksPolicy", LINELIST, SocksPolicy, NULL), VAR("SocksPort", UINT, SocksPort, "9050"), VAR("SocksTimeout", INTERVAL, SocksTimeout, "2 minutes"), /* if StatusFetchPeriod is 0, see get_status_fetch_period() in main.c */ VAR("StatusFetchPeriod", INTERVAL, StatusFetchPeriod, "0 seconds"), VAR("StrictEntryNodes", BOOL, StrictEntryNodes, "0"), Loading src/or/connection_edge.c +3 −3 Original line number Diff line number Diff line Loading @@ -314,7 +314,7 @@ connection_edge_finished_connecting(connection_t *conn) * connection_ap_handshake_attach_circuit() to attach to a new circuit (if * available) or launch a new one. * * For rendezvous streams, simply give up after 45 seconds (with no * For rendezvous streams, simply give up after SocksTimeout seconds (with no * retry attempt). */ void Loading @@ -335,7 +335,7 @@ connection_ap_expire_beginning(void) if (conn->type != CONN_TYPE_AP) continue; if (conn->state == AP_CONN_STATE_CONTROLLER_WAIT) { if (now - conn->timestamp_lastread >= 120) { if (now - conn->timestamp_lastread >= options->SocksTimeout) { log_notice(LD_APP, "Closing unattached stream."); connection_mark_unattached_ap(conn, END_STREAM_REASON_TIMEOUT); } Loading @@ -355,7 +355,7 @@ connection_ap_expire_beginning(void) continue; } if (circ->purpose == CIRCUIT_PURPOSE_C_REND_JOINED) { if (now - conn->timestamp_lastread > 45) { if (now - conn->timestamp_lastread > options->SocksTimeout) { log_notice(LD_REND, "Rend stream is %d seconds late. Giving up on address" " '%s.onion'.", Loading src/or/or.h +2 −0 Original line number Diff line number Diff line Loading @@ -1315,6 +1315,8 @@ typedef struct { int StatusFetchPeriod; /**< How often do we fetch running-routers lists? */ int KeepalivePeriod; /**< How often do we send padding cells to keep * connections alive? */ int SocksTimeout; /**< How long do we let a socks connection wait * unattached before we fail it? */ int MaxOnionsPending; /**< How many circuit CREATE requests do we allow * to wait simultaneously before we start dropping * them? */ Loading Loading
src/or/circuituse.c +1 −4 Original line number Diff line number Diff line Loading @@ -13,9 +13,6 @@ const char circuituse_c_id[] = #include "or.h" /** Longest time to wait for a circuit before closing an AP connection */ #define CONN_AP_MAX_ATTACH_DELAY 59 /********* START VARIABLES **********/ extern circuit_t *global_circuitlist; /* from circuitlist.c */ Loading Loading @@ -1154,7 +1151,7 @@ connection_ap_handshake_attach_circuit(connection_t *conn) tor_assert(conn->socks_request); conn_age = time(NULL) - conn->timestamp_created; if (conn_age > CONN_AP_MAX_ATTACH_DELAY) { if (conn_age > get_options()->SocksTimeout) { log_notice(LD_APP, "Tried for %d seconds to get a connection to %s:%d. Giving up.", conn_age, safe_str(conn->socks_request->address), Loading
src/or/config.c +1 −0 Original line number Diff line number Diff line Loading @@ -223,6 +223,7 @@ static config_var_t _option_vars[] = { VAR("SocksListenAddress", LINELIST, SocksListenAddress, NULL), VAR("SocksPolicy", LINELIST, SocksPolicy, NULL), VAR("SocksPort", UINT, SocksPort, "9050"), VAR("SocksTimeout", INTERVAL, SocksTimeout, "2 minutes"), /* if StatusFetchPeriod is 0, see get_status_fetch_period() in main.c */ VAR("StatusFetchPeriod", INTERVAL, StatusFetchPeriod, "0 seconds"), VAR("StrictEntryNodes", BOOL, StrictEntryNodes, "0"), Loading
src/or/connection_edge.c +3 −3 Original line number Diff line number Diff line Loading @@ -314,7 +314,7 @@ connection_edge_finished_connecting(connection_t *conn) * connection_ap_handshake_attach_circuit() to attach to a new circuit (if * available) or launch a new one. * * For rendezvous streams, simply give up after 45 seconds (with no * For rendezvous streams, simply give up after SocksTimeout seconds (with no * retry attempt). */ void Loading @@ -335,7 +335,7 @@ connection_ap_expire_beginning(void) if (conn->type != CONN_TYPE_AP) continue; if (conn->state == AP_CONN_STATE_CONTROLLER_WAIT) { if (now - conn->timestamp_lastread >= 120) { if (now - conn->timestamp_lastread >= options->SocksTimeout) { log_notice(LD_APP, "Closing unattached stream."); connection_mark_unattached_ap(conn, END_STREAM_REASON_TIMEOUT); } Loading @@ -355,7 +355,7 @@ connection_ap_expire_beginning(void) continue; } if (circ->purpose == CIRCUIT_PURPOSE_C_REND_JOINED) { if (now - conn->timestamp_lastread > 45) { if (now - conn->timestamp_lastread > options->SocksTimeout) { log_notice(LD_REND, "Rend stream is %d seconds late. Giving up on address" " '%s.onion'.", Loading
src/or/or.h +2 −0 Original line number Diff line number Diff line Loading @@ -1315,6 +1315,8 @@ typedef struct { int StatusFetchPeriod; /**< How often do we fetch running-routers lists? */ int KeepalivePeriod; /**< How often do we send padding cells to keep * connections alive? */ int SocksTimeout; /**< How long do we let a socks connection wait * unattached before we fail it? */ int MaxOnionsPending; /**< How many circuit CREATE requests do we allow * to wait simultaneously before we start dropping * them? */ Loading