diff options
Diffstat (limited to 'lib/inets/src/http_client/httpc_manager.erl')
-rw-r--r-- | lib/inets/src/http_client/httpc_manager.erl | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/inets/src/http_client/httpc_manager.erl b/lib/inets/src/http_client/httpc_manager.erl index f3cd81f4a7..b278077a66 100644 --- a/lib/inets/src/http_client/httpc_manager.erl +++ b/lib/inets/src/http_client/httpc_manager.erl @@ -30,6 +30,7 @@ request/2, cancel_request/2, request_canceled/2, + request_done/2, retry_request/2, redirect_request/2, insert_session/2, @@ -171,6 +172,18 @@ request_canceled(RequestId, ProfileName) -> %%-------------------------------------------------------------------- +%% Function: request_done(RequestId, ProfileName) -> ok +%% RequestId - ref() +%% ProfileName = atom() +%% +%% Description: Inform tha manager that a request has been completed. +%%-------------------------------------------------------------------- + +request_done(RequestId, ProfileName) -> + cast(ProfileName, {request_done, RequestId}). + + +%%-------------------------------------------------------------------- %% Function: insert_session(Session, ProfileName) -> _ %% Session - #tcp_session{} %% ProfileName - atom() @@ -486,6 +499,11 @@ handle_cast({request_canceled, RequestId}, State) -> {noreply, State} end; +handle_cast({request_done, RequestId}, State) -> + ?hcrv("request done", [{request_id, RequestId}]), + ets:delete(State#state.handler_db, RequestId), + {noreply, State}; + handle_cast({set_options, Options}, State = #state{options = OldOptions}) -> ?hcrv("set options", [{options, Options}, {old_options, OldOptions}]), NewOptions = |