Check if an event is initialized before calling event_del().

Libevent prints a warning to stderr if we do that.
This commit is contained in:
Guus Sliepen 2011-05-22 13:15:27 +02:00
parent 931e30f91a
commit 8ddcad5fa1
5 changed files with 12 additions and 6 deletions

View file

@ -228,5 +228,6 @@ void init_requests(void) {
void exit_requests(void) {
splay_delete_tree(past_request_tree);
event_del(&past_request_event);
if(timeout_initialized(&past_request_event))
event_del(&past_request_event);
}