diff options
| author | MeiMei <30769358+mei23@users.noreply.github.com> | 2018-10-05 01:58:41 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2018-10-05 01:58:41 +0900 |
| commit | f243ce66e77d2a2eeee08d160b9d764c2d1084d5 (patch) | |
| tree | 8cd34f0f1bff6323cf39ff3167346cca1380aeb0 /src/remote/activitypub/resolver.ts | |
| parent | Improve error handling of packaging functions (diff) | |
| download | sharkey-f243ce66e77d2a2eeee08d160b9d764c2d1084d5.tar.gz sharkey-f243ce66e77d2a2eeee08d160b9d764c2d1084d5.tar.bz2 sharkey-f243ce66e77d2a2eeee08d160b9d764c2d1084d5.zip | |
ActivityPubのHTTPリクエストの強化 (#2820)
* Fix error handling in AP deliver
* Set timeout to resolver
* Tune looks
Diffstat (limited to 'src/remote/activitypub/resolver.ts')
| -rw-r--r-- | src/remote/activitypub/resolver.ts | 2 |
1 files changed, 2 insertions, 0 deletions
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<string>; + 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' |