summaryrefslogtreecommitdiff
path: root/src/or/eventdns.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/eventdns.c')
-rw-r--r--src/or/eventdns.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/eventdns.c b/src/or/eventdns.c
index 582dc8b071..a3bb3bf245 100644
--- a/src/or/eventdns.c
+++ b/src/or/eventdns.c
@@ -3016,6 +3016,8 @@ evdns_shutdown(int fail_requests)
if (server->socket >= 0)
CLOSE_SOCKET(server->socket);
(void) event_del(&server->event);
+ if (server->state == 0)
+ (void) event_del(&server->timeout_event);
CLEAR(server);
free(server);
if (server_next == server_head)