diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-02 12:58:25 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-02 12:58:25 +0200 |
commit | bbb3be686ad960c5b1f34a7771dec09eb1783455 (patch) | |
tree | edc1ac02caad5febb5c911c1441690ea0536b65f | |
parent | 787409e64a625b22b6e2e309430f48a09bab9518 (diff) | |
download | PeerTube-bbb3be686ad960c5b1f34a7771dec09eb1783455.tar.gz PeerTube-bbb3be686ad960c5b1f34a7771dec09eb1783455.tar.zst PeerTube-bbb3be686ad960c5b1f34a7771dec09eb1783455.zip |
Use dns cache for requests
Prevent blocking issues in uv thread pool
-rw-r--r-- | server/helpers/requests.ts | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/server/helpers/requests.ts b/server/helpers/requests.ts index d3c83d26e..36e69458e 100644 --- a/server/helpers/requests.ts +++ b/server/helpers/requests.ts | |||
@@ -185,6 +185,7 @@ function buildGotOptions (options: PeerTubeRequestOptions) { | |||
185 | 185 | ||
186 | return { | 186 | return { |
187 | method: options.method, | 187 | method: options.method, |
188 | dnsCache: true, | ||
188 | json: options.json, | 189 | json: options.json, |
189 | searchParams: options.searchParams, | 190 | searchParams: options.searchParams, |
190 | timeout: options.timeout ?? REQUEST_TIMEOUT, | 191 | timeout: options.timeout ?? REQUEST_TIMEOUT, |