From 13b4f6de25df881075875417065eaf552e8316d8 Mon Sep 17 00:00:00 2001 From: benjaminplee Date: Wed, 19 Nov 2014 19:04:51 +0000 Subject: [PATCH] Connection now has whole responsibility of cleanup HTTP connection process now manages both scenarios requiring cleaning up of the load balancer's ets table; instead of this being owned by both the conn and lb. --- src/ibrowse_http_client.erl | 1 + src/ibrowse_lb.erl | 12 ------------ 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/ibrowse_http_client.erl b/src/ibrowse_http_client.erl index 7818a15..68e0ae3 100644 --- a/src/ibrowse_http_client.erl +++ b/src/ibrowse_http_client.erl @@ -266,6 +266,7 @@ handle_info(Info, State) -> %%-------------------------------------------------------------------- terminate(_Reason, State) -> do_close(State), + shutting_down(State), ok. %%-------------------------------------------------------------------- diff --git a/src/ibrowse_lb.erl b/src/ibrowse_lb.erl index 34f64f0..297c96b 100644 --- a/src/ibrowse_lb.erl +++ b/src/ibrowse_lb.erl @@ -167,18 +167,6 @@ handle_cast(_Msg, State) -> %%-------------------------------------------------------------------- handle_info({'EXIT', Parent, _Reason}, #state{parent_pid = Parent} = State) -> {stop, normal, State}; -handle_info({'EXIT', _Pid, _Reason}, #state{ets_tid = undefined} = State) -> - {noreply, State}; -handle_info({'EXIT', Pid, _Reason}, #state{ets_tid = Tid} = State) -> - ets:match_delete(Tid, {{'_', Pid}, '_'}), - case ets:info(Tid, size) of - 0 -> - ets:delete(Tid), - {noreply, State#state{ets_tid = undefined}, 10000}; - _ -> - {noreply, State} - end; - handle_info({trace, Bool}, #state{ets_tid = undefined} = State) -> put(my_trace_flag, Bool), {noreply, State};