Enable timeout on non android devices
This commit is contained in:
@@ -100,13 +100,13 @@ export class HttpFetchPlugin {
|
||||
});
|
||||
|
||||
const timeoutMs = request.retryParameters.timeout;
|
||||
if (timeoutMs) {
|
||||
// const timer = new shaka.util.Timer(() => {
|
||||
// abortStatus.timedOut = true;
|
||||
// controller.abort();
|
||||
// });
|
||||
// timer.tickAfter(timeoutMs / 1000);
|
||||
// op.finally(() => timer.stop());
|
||||
if (timeoutMs && Capacitor.getPlatform() !== 'android') {
|
||||
const timer = new shaka.util.Timer(() => {
|
||||
abortStatus.timedOut = true;
|
||||
controller.abort();
|
||||
});
|
||||
timer.tickAfter(timeoutMs / 1000);
|
||||
op.finally(() => timer.stop());
|
||||
}
|
||||
|
||||
return op;
|
||||
|
||||
Reference in New Issue
Block a user