diff options
Diffstat (limited to 'src/or/dns.c')
-rw-r--r-- | src/or/dns.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/dns.c b/src/or/dns.c index de4f4b800f..fb05729fd5 100644 --- a/src/or/dns.c +++ b/src/or/dns.c @@ -728,13 +728,13 @@ static int dnsworker_main(void *data) { log_fn(LOG_INFO,"DNS worker exiting because of error on connection to Tor process."); log_fn(LOG_INFO,"(Error on %d was %s)", fd, tor_socket_strerror(tor_socket_errno(fd))); } - close(fd); + tor_close_socket(fd); spawn_exit(); } if (address_len && read_all(fd, address, address_len, 1) != address_len) { log_fn(LOG_ERR,"read hostname failed. Child exiting."); - close(fd); + tor_close_socket(fd); spawn_exit(); } address[address_len] = 0; /* null terminate it */ @@ -761,7 +761,7 @@ static int dnsworker_main(void *data) { set_uint32(answer+1, ip); if (write_all(fd, answer, 5, 1) != 5) { log_fn(LOG_ERR,"writing answer failed. Child exiting."); - close(fd); + tor_close_socket(fd); spawn_exit(); } } |