Skip to content

Node.js based forum software built for the modern web

fix: add 10s timeout for AP message send

Julian Lam25d6ef432b15
diff --git a/src/activitypub/index.js b/src/activitypub/index.js
index 044a986da9..f57a39e322 100644
--- a/src/activitypub/index.js
+++ b/src/activitypub/index.js
@@ -330,6 +330,7 @@ async function sendMessage(uri, id, type, payload, attempts = 1) {
'content-type': 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"',
},
body: payload,
+ timeout: 10000, // configurable?
});
if (String(response.statusCode).startsWith('2')) {