diff options
Diffstat (limited to 'ares/ares_init.c')
-rw-r--r-- | ares/ares_init.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ares/ares_init.c b/ares/ares_init.c index add3ffe0d..298dd7b90 100644 --- a/ares/ares_init.c +++ b/ares/ares_init.c @@ -136,6 +136,7 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options, channel->nservers = -1; channel->ndomains = -1; channel->nsort = -1; + channel->tcp_connection_generation = 0; channel->lookups = NULL; channel->queries = NULL; channel->domains = NULL; @@ -201,10 +202,12 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options, server = &channel->servers[i]; server->udp_socket = ARES_SOCKET_BAD; server->tcp_socket = ARES_SOCKET_BAD; + server->tcp_connection_generation = ++channel->tcp_connection_generation; server->tcp_lenbuf_pos = 0; server->tcp_buffer = NULL; server->qhead = NULL; server->qtail = NULL; + server->is_broken = 0; } init_id_key(&channel->id_key, ARES_ID_KEY_LEN); |