mirror of
https://github.com/p-stream/providers.git
synced 2026-05-06 09:09:47 +00:00
Add timeout to fetch requests in valid.ts
This commit is contained in:
parent
0a6ebbd7ee
commit
adeeef68cc
1 changed files with 2 additions and 0 deletions
|
|
@ -92,6 +92,7 @@ export async function validatePlayableStream(
|
|||
...stream.preferredHeaders,
|
||||
...stream.headers,
|
||||
},
|
||||
signal: AbortSignal.timeout(10000)
|
||||
});
|
||||
result = {
|
||||
statusCode: response.status,
|
||||
|
|
@ -133,6 +134,7 @@ export async function validatePlayableStream(
|
|||
...stream.headers,
|
||||
Range: 'bytes=0-1',
|
||||
},
|
||||
signal: AbortSignal.timeout(10000),
|
||||
});
|
||||
return {
|
||||
statusCode: response.status,
|
||||
|
|
|
|||
Loading…
Reference in a new issue