Skip to content

Commit

Permalink
Do not retry fetch if destroyed.
Browse files Browse the repository at this point in the history
Closes #156

Change-Id: I1d50bbc5d3b00c0d472182435760616e8f1d37fa
  • Loading branch information
joeyparrish authored and Timothy Drews committed Aug 18, 2015
1 parent a26754d commit 85a0d94
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/media/stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,8 @@ shaka.media.Stream.prototype.onUpdate_ = function() {

var recoverableErrors = [0, 404, 410];
if (error.type == 'net' &&
recoverableErrors.indexOf(error.xhr.status) != -1) {
recoverableErrors.indexOf(error.xhr.status) != -1 &&
this.streamInfo_ /* not yet destroyed */) {
shaka.log.debug('Calling onUpdate_() in 5 seconds...');
// Depending on application policy, this could be recoverable,
// so set a timer on the supposition that the app might not end
Expand Down

0 comments on commit 85a0d94

Please sign in to comment.