Skip to content

Commit 972ea04

Browse files
committed
Use remap also when multi-range request fails
1 parent a8a2457 commit 972ea04

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/io.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2859,6 +2859,8 @@ class TFile {
28592859
if ((first === 0) && (last > 2) && (file.fMaxRanges > 1)) {
28602860
// server return no response with multi request - try to decrease ranges count or fail
28612861

2862+
if (file.fURL2)
2863+
setFileUrl(true);
28622864
if (last / 2 > 200)
28632865
file.fMaxRanges = 200;
28642866
else if (last / 2 > 50)
@@ -2879,7 +2881,7 @@ class TFile {
28792881
return send_new_request();
28802882
}
28812883

2882-
return rejectFunc(Error('Fail to read with several ranges'));
2884+
return rejectFunc(Error(`Fail to read with ${last/2} ranges`));
28832885
}
28842886

28852887
// if only single segment requested, return result as is

0 commit comments

Comments
 (0)