On which device is this issue being faced and what is the version of WICED that is being used?
Also could you share your project so that we could look into it?
SDK 6.2.1 with LWIP/FreeRTOS
It is simple as in libraries/protocols/dns.c, the hostname look up uses a static array called dns_server_address_array.
This array is set by a public function called dns_client_add_server_address
dns_client_add_server_address is only called from wiced_ip_up, found in wiced_network.c.
In the background, DHCP process is running in LWIP and storing updates from DHCP renews/ACKS through a LWIP helper function called dns_setserver, which stores the addresses into a static array called dns_servers, which is in LwIP/Ver2.0.3/src/core/dns.c. There is no noticeable link between LWIP's DNS library and the WICED DNS library, so the WICED DNS library has no knowledge if someone updated DNS settings in the DHCP server.
With the current configuration in order to get an updated DNS list in WICED, either the client has to bring the ip connection down with wiced_ip_down, or the wireless link has to go down.
I do not mind attempting to sync the LWIP dns_servers array to the WICED dns_server_address_array but I want to make sure there are no known multi-threading issues since LWIP is very strict on accessing the network thread from outside threads.
Is it possible for you to use a public DNS server like Google instead of the one provided by DHCP client?
If you need to use LwIP DHCP Clinet, you can try to sync LwIP dns_servers array to wiced_dns_server array just like you have mentioned. I don't think it should be an issue since the dns_getserver api is a callback style API from LwIP but then again this has not been tested from our side.