Bug 1169554 - Do not reconnect on shutdown. r=mayhemer
authorDragana Damjanovic <dd.mozilla@gmail.com>
Fri, 29 May 2015 02:06:00 -0400
changeset 247004 b95c3dd6b73e345c0746c9ab3cc411426277e075
parent 247003 57718eaf0d6a344be3005ab151ccb45afb0bf47d
child 247005 229b03af6f2b7d8f598d768531cffcbd0c508552
push id28848
push userryanvm@gmail.com
push dateWed, 03 Jun 2015 20:00:13 +0000
treeherdermozilla-central@0920f2325a6d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmayhemer
bugs1169554
milestone41.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 1169554 - Do not reconnect on shutdown. r=mayhemer
netwerk/base/nsSocketTransport2.cpp
--- a/netwerk/base/nsSocketTransport2.cpp
+++ b/netwerk/base/nsSocketTransport2.cpp
@@ -1914,18 +1914,18 @@ nsSocketTransport::OnSocketDetached(PRFi
         if (gIOService->IsOffline()) {
           mCondition = NS_ERROR_OFFLINE;
         }
         else {
           mCondition = NS_ERROR_ABORT;
         }
     }
 
-    // If we are not offline try again.
-    if (!gIOService->IsOffline() && RecoverFromError())
+    // If we are not shutting down try again.
+    if (!gIOService->IsShutdown() && RecoverFromError())
         mCondition = NS_OK;
     else {
         mState = STATE_CLOSED;
 
         // make sure there isn't any pending DNS request
         if (mDNSRequest) {
             mDNSRequest->Cancel(NS_ERROR_ABORT);
             mDNSRequest = 0;