mirror of
https://github.com/p-stream/providers.git
synced 2026-05-20 16:32:04 +00:00
increase timeout to match others and fix lint/prettier
This commit is contained in:
parent
40896364c7
commit
6b0ccb8162
1 changed files with 8 additions and 8 deletions
|
|
@ -92,7 +92,7 @@ export async function validatePlayableStream(
|
||||||
...stream.preferredHeaders,
|
...stream.preferredHeaders,
|
||||||
...stream.headers,
|
...stream.headers,
|
||||||
},
|
},
|
||||||
signal: AbortSignal.timeout(10000)
|
signal: AbortSignal.timeout(20000),
|
||||||
});
|
});
|
||||||
result = {
|
result = {
|
||||||
statusCode: response.status,
|
statusCode: response.status,
|
||||||
|
|
@ -112,9 +112,9 @@ export async function validatePlayableStream(
|
||||||
...stream.headers,
|
...stream.headers,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
new Promise<never>((_, reject) =>
|
new Promise<never>((_, reject) => {
|
||||||
setTimeout(() => reject(new Error('Timeout')), 10000)
|
setTimeout(() => reject(new Error('Timeout')), 20000);
|
||||||
)
|
}),
|
||||||
]);
|
]);
|
||||||
} catch {
|
} catch {
|
||||||
return null;
|
return null;
|
||||||
|
|
@ -139,7 +139,7 @@ export async function validatePlayableStream(
|
||||||
...stream.headers,
|
...stream.headers,
|
||||||
Range: 'bytes=0-1',
|
Range: 'bytes=0-1',
|
||||||
},
|
},
|
||||||
signal: AbortSignal.timeout(10000),
|
signal: AbortSignal.timeout(20000),
|
||||||
});
|
});
|
||||||
return {
|
return {
|
||||||
statusCode: response.status,
|
statusCode: response.status,
|
||||||
|
|
@ -161,9 +161,9 @@ export async function validatePlayableStream(
|
||||||
Range: 'bytes=0-1',
|
Range: 'bytes=0-1',
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
new Promise<never>((_, reject) =>
|
new Promise<never>((_, reject) => {
|
||||||
setTimeout(() => reject(new Error('Timeout')), 10000)
|
setTimeout(() => reject(new Error('Timeout')), 20000);
|
||||||
)
|
}),
|
||||||
]);
|
]);
|
||||||
} catch {
|
} catch {
|
||||||
return { statusCode: 500, body: '', finalUrl: quality.url };
|
return { statusCode: 500, body: '', finalUrl: quality.url };
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue