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.
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 @@
%%--------------------------------------------------------------------
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_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};