瀏覽代碼

abort request after onload to free ram

Geißer Michael 9 年之前
父節點
當前提交
bc741920a4
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      speedtest_worker.js

+ 1 - 0
speedtest_worker.js

@@ -176,6 +176,7 @@ function dlTest(done){
 				}.bind(this);
 				xhr[i].onload=function(){
 					//the large file has been loaded entirely, start again
+                    xhr[i].abort();// reset the stream data to empty ram
 					testStream(i,0);
 				}.bind(this);
 				xhr[i].onerror=function(){