mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 1161253 close pconns on background notification r=bagder
This commit is contained in:
parent
fd495e095e
commit
3f36d05a87
@ -363,6 +363,7 @@ nsHttpHandler::Init()
|
||||
mObserverService->AddObserver(this, "webapps-clear-data", true);
|
||||
mObserverService->AddObserver(this, "browser:purge-session-history", true);
|
||||
mObserverService->AddObserver(this, NS_NETWORK_LINK_TOPIC, true);
|
||||
mObserverService->AddObserver(this, "application-background", true);
|
||||
}
|
||||
|
||||
MakeNewRequestTokenBucket();
|
||||
@ -2010,6 +2011,12 @@ nsHttpHandler::Observe(nsISupports *subject,
|
||||
mConnMgr->VerifyTraffic();
|
||||
}
|
||||
}
|
||||
} else if (!strcmp(topic, "application-background")) {
|
||||
// going to the background on android means we should close
|
||||
// down idle connections for power conservation
|
||||
if (mConnMgr) {
|
||||
mConnMgr->DoShiftReloadConnectionCleanup(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user