Explorar el Código

If an actor cannot be retrieved, move the message back to the queue.

default hace 3 años
padre
commit
51ed24be47
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  1. 6 1
      activitypub.c

+ 6 - 1
activitypub.c

@@ -574,7 +574,12 @@ void process_message(snac *snac, char *msg, char *req)
         utype = "(null)";
         utype = "(null)";
 
 
     /* bring the actor */
     /* bring the actor */
-    actor_request(snac, actor, &actor_o);
+    if (!valid_status(actor_request(snac, actor, &actor_o))) {
+        /* error: re-enqueue to try later */
+        enqueue_input(snac, msg, req);
+        snac_log(snac, xs_fmt("error requesting actor %s -- retry later", actor));
+        return;
+    }
 
 
     /* check the signature */
     /* check the signature */
     /* ... */
     /* ... */