Explorar o código

Test settings can now be changed while in state 4 and not just state 0

dosse91 %!s(int64=5) %!d(string=hai) anos
pai
achega
c6a36e68c4
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      speedtest.js

+ 1 - 1
speedtest.js

@@ -69,7 +69,7 @@ Speedtest.prototype = {
    * Invalid values or nonexistant parameters will be ignored by the speedtest worker.
    */
   setParameter: function(parameter, value) {
-    if (this._state != 0)
+    if (this._state != 0 && this._state != 4)
       throw "You cannot change the test settings after adding server or starting the test";
     this._settings[parameter] = value;
     if(parameter === "telemetry_extra"){