Răsfoiți Sursa

abort request after onload to free ram

Geißer Michael 9 ani în urmă
părinte
comite
bc741920a4
1 a modificat fișierele cu 1 adăugiri și 0 ștergeri
  1. 1 0
      speedtest_worker.js

+ 1 - 0
speedtest_worker.js

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