attempt fix #5578
authorSchanzenbach, Martin <mschanzenbach@posteo.de>
Sun, 17 Feb 2019 19:21:45 +0000 (20:21 +0100)
committerSchanzenbach, Martin <mschanzenbach@posteo.de>
Sun, 17 Feb 2019 19:21:45 +0000 (20:21 +0100)
src/util/gnunet-service-resolver.c

index 79108ff2d579ffb502431ca4db95f9ed19f9a7f7..a1d4d0b454a6ca45e4a1af7ddb5535594eaf799f 100644 (file)
@@ -814,9 +814,18 @@ handle_resolve_result (void *cls,
                "DNS reply (hostname %s, request ID %u) contains no answers\n",
                 al->hostname,
                (unsigned int) al->client_request_id);
+    /* resume by trying again from cache */
+    if (GNUNET_NO ==
+      try_cache (al->hostname,
+                 al->record_type,
+                 al->client_request_id,
+                 al->client))
+    /* cache failed, tell client we could not get an answer */
+    {
+      send_end_msg (al->client_request_id,
+                    al->client);
+    }
     GNUNET_DNSPARSER_free_packet (parsed);
-    send_end_msg (al->client_request_id,
-                  al->client);
     free_active_lookup (al);
     return;
   }