Improved handling of changing DNS resolvers