diff --git a/libmproxy/flow.py b/libmproxy/flow.py index bbdd21a69..def52caa7 100644 --- a/libmproxy/flow.py +++ b/libmproxy/flow.py @@ -336,8 +336,6 @@ class Flow: class State: def __init__(self): - self.client_connections = [] - self._flow_map = {} self._flow_list = [] self.view = [] @@ -361,15 +359,6 @@ class State: c += 1 return c - def clientconnect(self, cc): - self.client_connections.append(cc) - - def clientdisconnect(self, dc): - """ - Start a browser connection. - """ - self.client_connections.remove(dc.client_conn) - def add_request(self, req): """ Add a request to the state. Returns the matching flow. @@ -634,11 +623,9 @@ class FlowMaster(controller.Master): #end nocover def handle_clientconnect(self, r): - self.state.clientconnect(r) r.ack() def handle_clientdisconnect(self, r): - self.state.clientdisconnect(r) r.ack() def handle_error(self, r): diff --git a/test/test_flow.py b/test/test_flow.py index 59c4e5b4a..b87951b62 100644 --- a/test/test_flow.py +++ b/test/test_flow.py @@ -253,8 +253,6 @@ class uState(libpry.AutoTree): """ bc = proxy.ClientConnect(("address", 22)) c = flow.State() - c.clientconnect(bc) - assert len(c.client_connections) == 1 req = tutils.treq(bc) f = c.add_request(req) @@ -284,8 +282,6 @@ class uState(libpry.AutoTree): assert c.active_flow_count() == 0 dc = proxy.ClientDisconnect(bc) - c.clientdisconnect(dc) - assert not c.client_connections def test_err(self): bc = proxy.ClientConnect(("address", 22)) @@ -302,7 +298,6 @@ class uState(libpry.AutoTree): c = flow.State() req = tutils.treq() - c.clientconnect(req.client_conn) assert len(c.view) == 0 f = c.add_request(req) @@ -317,7 +312,6 @@ class uState(libpry.AutoTree): assert len(c.view) == 1 req = tutils.treq() - c.clientconnect(req.client_conn) c.add_request(req) assert len(c.view) == 2 c.set_limit("~q") @@ -453,7 +447,6 @@ class uFlowMaster(libpry.AutoTree): assert not fm.handle_response(rx) dc = proxy.ClientDisconnect(req.client_conn) - fm.handle_clientdisconnect(dc) err = proxy.Error(f.request, "msg") fm.handle_error(err)