Skip to content

Commit

Permalink
Fix bug with hung web worker
Browse files Browse the repository at this point in the history
* Added upper limit to stop property of active chunk request
  • Loading branch information
maximusunc committed Apr 15, 2021
1 parent 6988e2b commit b889a65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cvat-core/src/frames.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@
if (nextChunkNumber * chunkSize < this.stopFrame) {
provider.setReadyToLoading(nextChunkNumber);
const nextStart = nextChunkNumber * chunkSize;
const nextStop = (nextChunkNumber + 1) * chunkSize - 1;
const nextStop = Math.min(this.stopFrame, (nextChunkNumber + 1) * chunkSize - 1);
if (!provider.isChunkCached(nextStart, nextStop)) {
if (!frameDataCache[this.tid].activeChunkRequest) {
frameDataCache[this.tid].activeChunkRequest = {
Expand Down

0 comments on commit b889a65

Please sign in to comment.