aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/http_client/httpc_handler_sup.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2011-05-11 12:05:11 +0200
committerIngela Anderton Andin <[email protected]>2011-05-11 16:14:07 +0200
commit5d32eaf750cff98d242c8048eeb6b49c94fb6ee6 (patch)
tree6277bd5d272a1c0ae98be67c35734b4f16e36ff9 /lib/inets/src/http_client/httpc_handler_sup.erl
parent495ed95eeda4aa37de2f7387a3f029eb907039d6 (diff)
downloadotp-5d32eaf750cff98d242c8048eeb6b49c94fb6ee6.tar.gz
otp-5d32eaf750cff98d242c8048eeb6b49c94fb6ee6.tar.bz2
otp-5d32eaf750cff98d242c8048eeb6b49c94fb6ee6.zip
Fixed httpc manager crash
httpc manager crashes.When a request results in a retry, the request id will be "reused" in the previous implementation a race condition could occur causing the manager to crash. This is now avoided by using proc_lib:init_ack and gen_server:enter_loop to allow more advanced initialization of httpc_handlers without blocking the httpc_manger and eliminating extra processes that can cause race conditions.
Diffstat (limited to 'lib/inets/src/http_client/httpc_handler_sup.erl')
-rw-r--r--lib/inets/src/http_client/httpc_handler_sup.erl8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/inets/src/http_client/httpc_handler_sup.erl b/lib/inets/src/http_client/httpc_handler_sup.erl
index 2a69fd15d0..f7a0b014b3 100644
--- a/lib/inets/src/http_client/httpc_handler_sup.erl
+++ b/lib/inets/src/http_client/httpc_handler_sup.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -23,7 +23,7 @@
%% API
-export([start_link/0]).
--export([start_child/2]).
+-export([start_child/1]).
%% Supervisor callback
-export([init/1]).
@@ -34,11 +34,9 @@
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
-start_child(Options, Profile) ->
- Args = [Options, Profile],
+start_child(Args) ->
supervisor:start_child(?MODULE, Args).
-
%%%=========================================================================
%%% Supervisor callback
%%%=========================================================================