From f243ce66e77d2a2eeee08d160b9d764c2d1084d5 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Fri, 5 Oct 2018 01:58:41 +0900 Subject: ActivityPubのHTTPリクエストの強化 (#2820) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix error handling in AP deliver * Set timeout to resolver * Tune looks --- src/remote/activitypub/resolver.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/remote/activitypub/resolver.ts') diff --git a/src/remote/activitypub/resolver.ts b/src/remote/activitypub/resolver.ts index 215e5e8704..ff26971758 100644 --- a/src/remote/activitypub/resolver.ts +++ b/src/remote/activitypub/resolver.ts @@ -7,6 +7,7 @@ const log = debug('misskey:activitypub:resolver'); export default class Resolver { private history: Set; + private timeout = 10 * 1000; constructor() { this.history = new Set(); @@ -50,6 +51,7 @@ export default class Resolver { const object = await request({ url: value, + timeout: this.timeout, headers: { 'User-Agent': config.user_agent, Accept: 'application/activity+json, application/ld+json' -- cgit v1.2.3-freya