Explorar o código

Do not retry Delete messages on actor error.

default %!s(int64=2) %!d(string=hai) anos
pai
achega
25b0829470
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      activitypub.c

+ 6 - 0
activitypub.c

@@ -1511,6 +1511,12 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req)
     }
     }
 
 
     if (!valid_status(a_status)) {
     if (!valid_status(a_status)) {
+        /* do not retry 'Delete' messages */
+        if (strcmp(type, "Delete") == 0) {
+            srv_debug(1, xs_fmt("dropping 'Delete' message due to actor error", actor, a_status));
+            return -1;
+        }
+
         /* other actor download errors may need a retry */
         /* other actor download errors may need a retry */
         srv_debug(1, xs_fmt("error requesting actor %s %d -- retry later", actor, a_status));
         srv_debug(1, xs_fmt("error requesting actor %s %d -- retry later", actor, a_status));