diff options
author | Roger Dingledine <arma@torproject.org> | 2006-06-12 11:59:19 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2006-06-12 11:59:19 +0000 |
commit | 87e3800dfc0adcd6cb4e57e693072fd2d07217b1 (patch) | |
tree | c9988cf7d2ab2ddbb686487b750ebba30ce45880 /src/or/dns.c | |
parent | d90d4b4c9061d0e16f354d8b64cf54b750752e00 (diff) | |
download | tor-87e3800dfc0adcd6cb4e57e693072fd2d07217b1.tar tor-87e3800dfc0adcd6cb4e57e693072fd2d07217b1.tar.gz |
Finally solve the "closing wedged cpuworkers" bug. Woo.
This happened when we got two create cells in a row from the same TLS
connection. It would hand one to the cpuworker, and then immediately
handle the second one -- after it had registered that the first one was
busy, but before it had updated the timestamp that we use to decide how
*long* it's been busy.
svn:r6606
Diffstat (limited to 'src/or/dns.c')
-rw-r--r-- | src/or/dns.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/dns.c b/src/or/dns.c index 2d3d800c2..f5e2675db 100644 --- a/src/or/dns.c +++ b/src/or/dns.c @@ -701,6 +701,10 @@ assign_to_dnsworker(connection_t *exitconn) tor_free(dnsconn->address); dnsconn->address = tor_strdup(exitconn->address); dnsconn->state = DNSWORKER_STATE_BUSY; + /* touch the lastwritten timestamp, since that's how we check to + * see how long it's been since we asked the question, and sometimes + * we check before the first call to connection_handle_write(). */ + dnsconn->timestamp_lastwritten = time(NULL); num_dnsworkers_busy++; len = strlen(dnsconn->address); |