Bug 1152531 - Releasing MMS connection if MMS fails to send due to ensureRouting error. r=bevis, a=bajaj
authorEdgar Chen <echen@mozilla.com>
Fri, 10 Apr 2015 15:10:14 +0800
changeset 238148 0697e47968a2
parent 238147 db82a837c490
child 238149 3f4b9420cc52
push id491
push userryanvm@gmail.com
push date2015-04-15 02:40 +0000
treeherdermozilla-b2g37_v2_2@7fa668810d43 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbevis, bajaj
bugs1152531
milestone37.0
Bug 1152531 - Releasing MMS connection if MMS fails to send due to ensureRouting error. r=bevis, a=bajaj
dom/mobilemessage/gonk/MmsService.js
--- a/dom/mobilemessage/gonk/MmsService.js
+++ b/dom/mobilemessage/gonk/MmsService.js
@@ -716,16 +716,17 @@ XPCOMUtils.defineLazyGetter(this, "gMmsT
                                                  cancellable.done.bind(cancellable));
         }.bind(this);
 
         mmsConnection.ensureRouting(url)
           .then(() => startTransaction(),
                 (aError) => {
                   debug("Failed to ensureRouting: " + aError);
 
+                  mmsConnection.release();
                   cancellable.done(_HTTP_STATUS_FAILED_TO_ROUTE);
                 });
       }).bind(this));
 
       return cancellable;
     },
 
     sendHttpRequest: function(mmsConnection, method, url, istream, proxyFilter,