do not delete uninitialized timeout event in evdns

svn:r697
This commit is contained in:
Niels Provos 2008-03-31 00:33:46 +00:00
parent 502929cdf2
commit 3ef1f50415
2 changed files with 3 additions and 1 deletions

View File

@ -61,6 +61,7 @@ Changes in current version:
o switch thread support so that locks get allocated as they are needed.
o make event methods static so that they are not exported; from Andrei Nigmatulin
o make RPC replies use application/octet-stream as mime type
o do not delete uninitialized timeout event in evdns
Changes in 1.4.0:
o allow \r or \n individually to separate HTTP headers instead of the standard "\r\n"; from Charles Kerr.

View File

@ -2022,7 +2022,8 @@ evdns_clear_nameservers_and_suspend(void)
while (1) {
struct nameserver *next = server->next;
(void) event_del(&server->event);
(void) evtimer_del(&server->timeout_event);
if (evtimer_initialized(&server->timeout_event))
(void) evtimer_del(&server->timeout_event);
if (server->socket >= 0)
CLOSE_SOCKET(server->socket);
event_free(server);