Bug 972794 - [Tarako]Connect wpa supplicant consume 5 seconds. r=chulee
authorVincent Chang <vchang@mozilla.com>
Fri, 07 Mar 2014 19:29:55 +0800
changeset 173882 e3f743545ef1
parent 173881 e7d9e2b670b5
child 173883 a1592db51b9a
child 173885 290907a99529
push id26429
push usercbook@mozilla.com
push date2014-03-17 11:40 +0000
treeherdermozilla-central@a1592db51b9a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschulee
bugs972794
milestone30.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 972794 - [Tarako]Connect wpa supplicant consume 5 seconds. r=chulee
dom/wifi/WifiWorker.js
--- a/dom/wifi/WifiWorker.js
+++ b/dom/wifi/WifiWorker.js
@@ -549,24 +549,24 @@ var WifiManager = (function() {
   function connectCallback(ok) {
     if (ok === 0) {
       // Tell the event worker to start waiting for events.
       retryTimer = null;
       connectTries = 0;
       didConnectSupplicant(function(){});
       return;
     }
-    if (connectTries++ < 3) {
-      // Try again in 5 seconds.
+    if (connectTries++ < 5) {
+      // Try again in 1 seconds.
       if (!retryTimer)
         retryTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
 
       retryTimer.initWithCallback(function(timer) {
         wifiCommand.connectToSupplicant(connectCallback);
-      }, 5000, Ci.nsITimer.TYPE_ONE_SHOT);
+      }, 1000, Ci.nsITimer.TYPE_ONE_SHOT);
       return;
     }
 
     retryTimer = null;
     connectTries = 0;
     notify("supplicantlost", { success: false });
   }