aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-11-29 15:45:02 +0100
committerChocobozzz <me@florianbigard.com>2021-11-29 15:45:02 +0100
commit4c99953acd04a2405db58ae2d7656a488bcc63a4 (patch)
treec2a35b969787729ec0013a8746493cdbca7b720b /server/lib
parentc5e53d0e3979c4602760e507a7240ea6ffad7823 (diff)
downloadPeerTube-4c99953acd04a2405db58ae2d7656a488bcc63a4.tar.gz
PeerTube-4c99953acd04a2405db58ae2d7656a488bcc63a4.tar.zst
PeerTube-4c99953acd04a2405db58ae2d7656a488bcc63a4.zip
Fix redundancy timeout
Diffstat (limited to 'server/lib')
-rw-r--r--server/lib/activitypub/actors/webfinger.ts4
-rw-r--r--server/lib/hls.ts2
2 files changed, 3 insertions, 3 deletions
diff --git a/server/lib/activitypub/actors/webfinger.ts b/server/lib/activitypub/actors/webfinger.ts
index 5532f05bd..b20a724da 100644
--- a/server/lib/activitypub/actors/webfinger.ts
+++ b/server/lib/activitypub/actors/webfinger.ts
@@ -1,7 +1,7 @@
1import WebFinger from 'webfinger.js' 1import WebFinger from 'webfinger.js'
2import { isProdInstance } from '@server/helpers/core-utils' 2import { isProdInstance } from '@server/helpers/core-utils'
3import { isActivityPubUrlValid } from '@server/helpers/custom-validators/activitypub/misc' 3import { isActivityPubUrlValid } from '@server/helpers/custom-validators/activitypub/misc'
4import { REQUEST_TIMEOUT, WEBSERVER } from '@server/initializers/constants' 4import { REQUEST_TIMEOUTS, WEBSERVER } from '@server/initializers/constants'
5import { ActorModel } from '@server/models/actor/actor' 5import { ActorModel } from '@server/models/actor/actor'
6import { MActorFull } from '@server/types/models' 6import { MActorFull } from '@server/types/models'
7import { WebFingerData } from '@shared/models' 7import { WebFingerData } from '@shared/models'
@@ -10,7 +10,7 @@ const webfinger = new WebFinger({
10 webfist_fallback: false, 10 webfist_fallback: false,
11 tls_only: isProdInstance(), 11 tls_only: isProdInstance(),
12 uri_fallback: false, 12 uri_fallback: false,
13 request_timeout: REQUEST_TIMEOUT 13 request_timeout: REQUEST_TIMEOUTS.DEFAULT
14}) 14})
15 15
16async function loadActorUrlOrGetFromWebfinger (uriArg: string) { 16async function loadActorUrlOrGetFromWebfinger (uriArg: string) {
diff --git a/server/lib/hls.ts b/server/lib/hls.ts
index d969549b8..3331e6272 100644
--- a/server/lib/hls.ts
+++ b/server/lib/hls.ts
@@ -130,7 +130,7 @@ function downloadPlaylistSegments (playlistUrl: string, destinationDir: string,
130 for (const fileUrl of fileUrls) { 130 for (const fileUrl of fileUrls) {
131 const destPath = join(tmpDirectory, basename(fileUrl)) 131 const destPath = join(tmpDirectory, basename(fileUrl))
132 132
133 await doRequestAndSaveToFile(fileUrl, destPath, { bodyKBLimit: remainingBodyKBLimit }) 133 await doRequestAndSaveToFile(fileUrl, destPath, { bodyKBLimit: remainingBodyKBLimit, timeout: REQUEST_TIMEOUTS.FILE })
134 134
135 const { size } = await stat(destPath) 135 const { size } = await stat(destPath)
136 remainingBodyKBLimit -= (size / 1000) 136 remainingBodyKBLimit -= (size / 1000)