diff --git a/gio/gnetworkaddress.c b/gio/gnetworkaddress.c
index 9fe65d7..2e4042c 100644
--- a/gio/gnetworkaddress.c
+++ b/gio/gnetworkaddress.c
@@ -958,20 +958,19 @@ g_network_address_address_enumerator_next_async (GSocketAddressEnumerator  *enum
   if (addr_enum->addresses == NULL)
     {
       GNetworkAddress *addr = addr_enum->addr;
+      GResolver *resolver = g_resolver_get_default ();
+      gint64 serial = g_resolver_get_serial (resolver);
 
-      if (!addr->priv->sockaddrs)
+      if (addr->priv->resolver_serial != 0 &&
+          addr->priv->resolver_serial != serial)
         {
-          GResolver *resolver = g_resolver_get_default ();
-          gint64 serial = g_resolver_get_serial (resolver);
-
-          if (addr->priv->resolver_serial != 0 &&
-              addr->priv->resolver_serial != serial)
-            {
-              /* Resolver has reloaded, discard cached addresses */
-              g_list_free_full (addr->priv->sockaddrs, g_object_unref);
-              addr->priv->sockaddrs = NULL;
-            }
+          /* Resolver has reloaded, discard cached addresses */
+          g_list_free_full (addr->priv->sockaddrs, g_object_unref);
+          addr->priv->sockaddrs = NULL;
+        }
 
+      if (!addr->priv->sockaddrs)
+        {
           if (g_network_address_parse_sockaddr (addr))
             have_addresses (addr_enum, task, NULL);
           else
@@ -987,6 +986,7 @@ g_network_address_address_enumerator_next_async (GSocketAddressEnumerator  *enum
 
       addr_enum->addresses = addr->priv->sockaddrs;
       addr_enum->next = addr_enum->addresses;
+      g_object_unref (resolver);
     }
 
   if (addr_enum->next)
diff --git a/gio/gresolver.c b/gio/gresolver.c
index 7f4a0d6..e100bcb 100644
--- a/gio/gresolver.c
+++ b/gio/gresolver.c
@@ -865,6 +865,10 @@ g_resolver_lookup_records_finish (GResolver     *resolver,
 guint64
 g_resolver_get_serial (GResolver *resolver)
 {
+  g_return_val_if_fail (G_IS_RESOLVER (resolver), 0);
+
+  g_resolver_maybe_reload (resolver);
+
 #ifdef G_OS_UNIX
   return (guint64) resolver->priv->resolv_conf_timestamp;
 #else
