Bug 1115231 - Clear timed out Simple Push requests. r=nsm
authorIwahashi Kentarou <iwahashi.kentarou.dev@gmail.com>
Sat, 04 Jun 2016 14:45:59 -0700
changeset 301001 eb00b57e9cd0e2d8de9b6036dce929083db8a932
parent 301000 51bd83e16a49cf1c31114ba2f767295e5d50b0d2
child 301002 66f36dfa22da54abbd176f8fa164c6e7d538a4c7
push id19599
push usercbook@mozilla.com
push dateWed, 08 Jun 2016 10:16:21 +0000
treeherderfx-team@81f4cc3f6f4c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnsm
bugs1115231
milestone50.0a1
Bug 1115231 - Clear timed out Simple Push requests. r=nsm MozReview-Commit-ID: Px63HJ0RrN
dom/simplepush/PushService.jsm
--- a/dom/simplepush/PushService.jsm
+++ b/dom/simplepush/PushService.jsm
@@ -353,17 +353,17 @@ this.PushService = {
             if (requestTimedOut || duration > this._requestTimeout) {
               debug("Request timeout: Removing " + channelID);
               requestTimedOut = true;
               this._pendingRequests[channelID]
                 .deferred.reject({status: 0, error: "TimeoutError"});
 
               delete this._pendingRequests[channelID];
               for (let i = this._requestQueue.length - 1; i >= 0; --i)
-                if (this._requestQueue[i].channelID == channelID)
+                if (this._requestQueue[i][1].channelID == channelID)
                   this._requestQueue.splice(i, 1);
             }
           }
 
           // The most likely reason for a registration request timing out is
           // that the socket has disconnected. Best to reconnect.
           if (requestTimedOut) {
             this._shutdownWS();