1 From a0c84e27f2c40d043c85ba3b794d3578e909f558 Mon Sep 17 00:00:00 2001
2 From: Mike Perry <mikeperry-git@torproject.org>
3 Date: Wed, 1 Feb 2012 15:53:28 -0800
4 Subject: [PATCH 11/13] Provide an observer event to close persistent
7 We need to prevent linkability across "New Identity", which includes closing
8 keep-alive connections.
10 netwerk/protocol/http/nsHttpHandler.cpp | 7 +++++++
11 1 files changed, 7 insertions(+), 0 deletions(-)
13 diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp
14 index 727b5d6..87b55bc 100644
15 --- a/netwerk/protocol/http/nsHttpHandler.cpp
16 +++ b/netwerk/protocol/http/nsHttpHandler.cpp
17 @@ -329,6 +329,7 @@ nsHttpHandler::Init()
18 mObserverService->AddObserver(this, "net:clear-active-logins", true);
19 mObserverService->AddObserver(this, NS_PRIVATE_BROWSING_SWITCH_TOPIC, true);
20 mObserverService->AddObserver(this, "net:prune-dead-connections", true);
21 + mObserverService->AddObserver(this, "net:prune-all-connections", PR_TRUE);
25 @@ -1533,6 +1534,12 @@ nsHttpHandler::Observe(nsISupports *subject,
26 mConnMgr->PruneDeadConnections();
29 + else if (strcmp(topic, "net:prune-all-connections") == 0) {
31 + mConnMgr->ClosePersistentConnections();
32 + mConnMgr->PruneDeadConnections();