summaryrefslogtreecommitdiff
path: root/activitypub.c
diff options
context:
space:
mode:
Diffstat (limited to 'activitypub.c')
-rw-r--r--activitypub.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/activitypub.c b/activitypub.c
index 0ed764e..94c0d30 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -2371,6 +2371,7 @@ void process_queue_item(xs_dict *q_item)
2371 int p_status = xs_number_get(xs_dict_get(q_item, "p_status")); 2371 int p_status = xs_number_get(xs_dict_get(q_item, "p_status"));
2372 xs *payload = NULL; 2372 xs *payload = NULL;
2373 int p_size = 0; 2373 int p_size = 0;
2374 int timeout = 0;
2374 2375
2375 if (xs_is_null(inbox) || xs_is_null(msg) || xs_is_null(keyid) || xs_is_null(seckey)) { 2376 if (xs_is_null(inbox) || xs_is_null(msg) || xs_is_null(keyid) || xs_is_null(seckey)) {
2376 srv_log(xs_fmt("output message error: missing fields")); 2377 srv_log(xs_fmt("output message error: missing fields"));
@@ -2383,8 +2384,15 @@ void process_queue_item(xs_dict *q_item)
2383 } 2384 }
2384 2385
2385 /* deliver (if previous error status was a timeout, try now longer) */ 2386 /* deliver (if previous error status was a timeout, try now longer) */
2386 status = send_to_inbox_raw(keyid, seckey, inbox, msg, 2387 if (p_status == 599)
2387 &payload, &p_size, p_status == 599 ? 8 : 6); 2388 timeout = xs_number_get(xs_dict_get_def(srv_config, "queue_timeout_2", "8"));
2389 else
2390 timeout = xs_number_get(xs_dict_get_def(srv_config, "queue_timeout", "6"));
2391
2392 if (timeout == 0)
2393 timeout = 6;
2394
2395 status = send_to_inbox_raw(keyid, seckey, inbox, msg, &payload, &p_size, timeout);
2388 2396
2389 if (payload) { 2397 if (payload) {
2390 if (p_size > 64) { 2398 if (p_size > 64) {