Bug 1152046 - Don't try to connect if we are shutting down. r=mayhemer

This commit is contained in:
Dragana Damjanovic 2015-05-29 02:04:00 -04:00
parent a3ffa582a7
commit 282fb00333
2 changed files with 4 additions and 0 deletions

View File

@ -78,6 +78,7 @@ public:
nsAsyncRedirectVerifyHelper *helper);
bool IsOffline() { return mOffline; }
bool IsShutdown() { return mShutdown; }
bool IsLinkUp();
// Should only be called from NeckoChild. Use SetAppOffline instead.

View File

@ -1217,6 +1217,9 @@ nsSocketTransport::InitiateSocket()
bool isLocal;
IsLocal(&isLocal);
if (gIOService->IsShutdown()) {
return NS_ERROR_ABORT;
}
if (gIOService->IsOffline()) {
if (!isLocal)
return NS_ERROR_OFFLINE;