diff options
Diffstat (limited to 'deps/cares/src/ares_options.c')
-rw-r--r-- | deps/cares/src/ares_options.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/deps/cares/src/ares_options.c b/deps/cares/src/ares_options.c index c3cbd1df707..de49de46259 100644 --- a/deps/cares/src/ares_options.c +++ b/deps/cares/src/ares_options.c @@ -153,6 +153,9 @@ int ares_set_servers(ares_channel channel, if (!channel) return ARES_ENODATA; + if (!ares__is_list_empty(&channel->all_queries)) + return ARES_ENOTIMP; + ares__destroy_servers_state(channel); for (srvr = servers; srvr; srvr = srvr->next) @@ -202,6 +205,9 @@ int ares_set_servers_ports(ares_channel channel, if (!channel) return ARES_ENODATA; + if (!ares__is_list_empty(&channel->all_queries)) + return ARES_ENOTIMP; + ares__destroy_servers_state(channel); for (srvr = servers; srvr; srvr = srvr->next) @@ -258,8 +264,6 @@ static int set_servers_csv(ares_channel channel, if (!channel) return ARES_ENODATA; - ares__destroy_servers_state(channel); - i = strlen(_csv); if (i == 0) return ARES_SUCCESS; /* blank all servers */ |