Skip to content

Commit

Permalink
feat: Change default network request timeout (shaka-project#3024)
Browse files Browse the repository at this point in the history
The old default was 0 (effectively infinite, no timeout).  The new default is 30s.

Closes: shaka-project#1578
  • Loading branch information
Álvaro Velad Galván authored Dec 17, 2020
1 parent 207c235 commit 40a0b36
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions externs/shaka/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
* For example, 0.5 means "between 50% below and 50% above the retry delay."
* @property {number} timeout
* The request timeout, in milliseconds. Zero means "unlimited".
* <i>Defaults to 30000 milliseconds.</i>
*
* @tutorial network-and-buffering-config
*
Expand Down
2 changes: 1 addition & 1 deletion lib/net/backoff.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ shaka.net.Backoff = class {
baseDelay: 1000,
backoffFactor: 2,
fuzzFactor: 0.5,
timeout: 0,
timeout: 30000,
};
}

Expand Down

0 comments on commit 40a0b36

Please sign in to comment.