Sfoglia il codice sorgente

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

default 3 anni fa
parent
commit
51ed24be47
1 ha cambiato i file con 6 aggiunte e 1 eliminazioni
  1. 6 1
      activitypub.c

+ 6 - 1
activitypub.c

@@ -574,7 +574,12 @@ void process_message(snac *snac, char *msg, char *req)
         utype = "(null)";
 
     /* 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 */
     /* ... */