REST/GNS: timeout handle
authorSchanzenbach, Martin <mschanzenbach@posteo.de>
Tue, 30 Apr 2019 20:46:23 +0000 (22:46 +0200)
committerSchanzenbach, Martin <mschanzenbach@posteo.de>
Tue, 30 Apr 2019 20:46:23 +0000 (22:46 +0200)
src/gns/plugin_rest_gns.c

index 21638fdf66c8fbb6566f60a7996d7ca344c35add..88868879835c7c9a454163253685e2713161429e 100644 (file)
@@ -190,6 +190,9 @@ do_error (void *cls)
   json_t *json_error = json_object();
   char *response;
 
+  if (NULL != handle->timeout_task)
+    GNUNET_SCHEDULER_cancel (handle->timeout_task);
+  handle->timeout_task = NULL;
   if (NULL == handle->emsg)
     handle->emsg = GNUNET_strdup(GNUNET_REST_GNS_ERROR_UNKNOWN);