Browse Source

优化重试策略

dev
刘向辉 3 years ago
parent
commit
e408379388
  1. 2
      src/app/babylon/game.ts

2
src/app/babylon/game.ts

@ -135,7 +135,7 @@ var MyRetryStrategy = /** @class */ (function () {
if (baseInterval === void 0) { baseInterval = 500; } if (baseInterval === void 0) { baseInterval = 500; }
return function (url, request, retryIndex) { return function (url, request, retryIndex) {
if (request.status == 0 || retryIndex >= maxRetries || url.indexOf("file:") !== -1) { if (retryIndex >= maxRetries || url.indexOf("file:") !== -1) {
console.log("不重试加载", request.status, retryIndex, url.indexOf("file:")); console.log("不重试加载", request.status, retryIndex, url.indexOf("file:"));
return -1; return -1;
} }

Loading…
Cancel
Save