diff options
author | Nick Mathewson <nickm@torproject.org> | 2009-02-23 20:04:51 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2009-02-23 20:04:51 +0000 |
commit | 27c3b43817d1c150049437a8906785a4fee0814f (patch) | |
tree | 41e088047ae3a446eacdae7e5b0801667ea5d6ac /src/or/eventdns.c | |
parent | c7f3416a9e24b140e5119dc727885a739f68cb5b (diff) | |
download | tor-27c3b43817d1c150049437a8906785a4fee0814f.tar.gz tor-27c3b43817d1c150049437a8906785a4fee0814f.zip |
Fix one case of bug 929.
svn:r18683
Diffstat (limited to 'src/or/eventdns.c')
-rw-r--r-- | src/or/eventdns.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/or/eventdns.c b/src/or/eventdns.c index 4c50a109f5..63851483f3 100644 --- a/src/or/eventdns.c +++ b/src/or/eventdns.c @@ -2016,14 +2016,17 @@ evdns_request_timeout_callback(int fd, short events, void *arg) { nameserver_failed(req->ns, "request timed out."); } - del_timeout_event(req); - CLEAR(&req->timeout_event); if (req->tx_count >= global_max_retransmits) { /* this request has failed */ reply_callback(req, 0, DNS_ERR_TIMEOUT, NULL); request_finished(req, &req_head); } else { /* retransmit it */ + /* Stop waiting for the timeout. No need to do this in + * request_finished; that one already deletes the timeout event. + * XXXX021 port this change to libevent. */ + del_timeout_event(req); + CLEAR(&req->timeout_event); evdns_request_transmit(req); } } |