REST/GNS: timeout handle 2nd try
authorSchanzenbach, Martin <mschanzenbach@posteo.de>
Tue, 30 Apr 2019 21:06:28 +0000 (23:06 +0200)
committerSchanzenbach, Martin <mschanzenbach@posteo.de>
Tue, 30 Apr 2019 21:06:28 +0000 (23:06 +0200)
src/gns/plugin_rest_gns.c

index 88868879835c7c9a454163253685e2713161429e..7f8d6fccf76b56cf554ab9c70413ee6452dcd393 100644 (file)
@@ -209,6 +209,15 @@ do_error (void *cls)
 }
 
 
+static void
+do_timeout (void *cls)
+{
+  struct RequestHandle *handle = cls;
+  handle->timeout_task = NULL;
+  do_error (handle);
+}
+
+
 /**
  * Iterator called on obtained result for a GNS lookup.
  *
@@ -402,7 +411,7 @@ rest_process_request(struct GNUNET_REST_RequestHandle *rest_handle,
 
   handle->timeout_task =
     GNUNET_SCHEDULER_add_delayed (handle->timeout,
-                                  &do_error,
+                                  &do_timeout,
                                   handle);
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connected\n");