Skip to content

Commit

Permalink
Merge pull request #8594 from AnalyticalGraphicsInc/fix-expiration
Browse files Browse the repository at this point in the history
Fix expiration crash in case request is cancelled due to low priority
  • Loading branch information
likangning93 authored Feb 6, 2020
2 parents 443db9c + 4aa8aa1 commit 1a84f21
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Source/Scene/Cesium3DTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -842,10 +842,6 @@ import TileOrientedBoundingBox from './TileOrientedBoundingBox.js';
this._contentReadyToProcessPromise = when.defer();
this._contentReadyPromise = when.defer();

if (expired) {
this.expireDate = undefined;
}

var contentFailedFunction = getContentFailedFunction(this, tileset);
promise.then(function(arrayBuffer) {
if (that.isDestroyed()) {
Expand All @@ -869,6 +865,10 @@ import TileOrientedBoundingBox from './TileOrientedBoundingBox.js';
that.hasTilesetContent = true;
}

if (expired) {
that.expireDate = undefined;
}

that._content = content;
that._contentState = Cesium3DTileContentState.PROCESSING;
that._contentReadyToProcessPromise.resolve(content);
Expand Down

0 comments on commit 1a84f21

Please sign in to comment.