mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
hidden service client connections were using some of their
60 seconds fetching the hidserv descriptor, which made them more likely to fail on the first attempt, yet they work fine on the second. so now give them extra time for the first try. svn:r4127
This commit is contained in:
parent
2a7aec0ffd
commit
adaf3d31e6
@ -382,6 +382,7 @@ rend_client_receive_rendezvous(circuit_t *circ, const char *request, size_t requ
|
|||||||
void rend_client_desc_here(char *query) {
|
void rend_client_desc_here(char *query) {
|
||||||
connection_t *conn;
|
connection_t *conn;
|
||||||
rend_cache_entry_t *entry;
|
rend_cache_entry_t *entry;
|
||||||
|
time_t now = time(NULL);
|
||||||
|
|
||||||
while ((conn = connection_get_by_type_state_rendquery(CONN_TYPE_AP,
|
while ((conn = connection_get_by_type_state_rendquery(CONN_TYPE_AP,
|
||||||
AP_CONN_STATE_RENDDESC_WAIT, query))) {
|
AP_CONN_STATE_RENDDESC_WAIT, query))) {
|
||||||
@ -391,6 +392,13 @@ void rend_client_desc_here(char *query) {
|
|||||||
* valid entry from before which we should reuse */
|
* valid entry from before which we should reuse */
|
||||||
log_fn(LOG_INFO,"Rend desc is usable. Launching circuits.");
|
log_fn(LOG_INFO,"Rend desc is usable. Launching circuits.");
|
||||||
conn->state = AP_CONN_STATE_CIRCUIT_WAIT;
|
conn->state = AP_CONN_STATE_CIRCUIT_WAIT;
|
||||||
|
|
||||||
|
/* restart their timeout values, so they get a fair shake at
|
||||||
|
* connecting to the hidden service. */
|
||||||
|
conn->timestamp_created = now;
|
||||||
|
conn->timestamp_lastread = now;
|
||||||
|
conn->timestamp_lastwritten = now;
|
||||||
|
|
||||||
if (connection_ap_handshake_attach_circuit(conn) < 0) {
|
if (connection_ap_handshake_attach_circuit(conn) < 0) {
|
||||||
/* it will never work */
|
/* it will never work */
|
||||||
log_fn(LOG_WARN,"attaching to a rend circ failed. Closing conn.");
|
log_fn(LOG_WARN,"attaching to a rend circ failed. Closing conn.");
|
||||||
|
Loading…
Reference in New Issue
Block a user