diff options
author | Micael Karlberg <[email protected]> | 2013-11-13 17:20:31 +0100 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2013-11-13 17:20:31 +0100 |
commit | 8bcd32dfceec3b4381747046b82eec42487c7518 (patch) | |
tree | cca7f396b6b3bd98950e5fc7713dfc9988633b10 /lib/inets/src/http_client/httpc.erl | |
parent | dc6f086a0751677da8724df397a062ab154f34cb (diff) | |
parent | b166476d2674c056ed5f737170074e71fbdc4bfd (diff) | |
download | otp-8bcd32dfceec3b4381747046b82eec42487c7518.tar.gz otp-8bcd32dfceec3b4381747046b82eec42487c7518.tar.bz2 otp-8bcd32dfceec3b4381747046b82eec42487c7518.zip |
Merge branch 'bmk/snmp/handling_corrupt_atl_when_converting/r16/OTP-11453' into bmk/snmp/snmp425_integration
Conflicts:
lib/snmp/src/misc/snmp_log.erl
Diffstat (limited to 'lib/inets/src/http_client/httpc.erl')
-rw-r--r-- | lib/inets/src/http_client/httpc.erl | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/lib/inets/src/http_client/httpc.erl b/lib/inets/src/http_client/httpc.erl index 4d7023a8e9..da9bbdd1ec 100644 --- a/lib/inets/src/http_client/httpc.erl +++ b/lib/inets/src/http_client/httpc.erl @@ -208,16 +208,8 @@ cancel_request(RequestId) -> cancel_request(RequestId, Profile) when is_atom(Profile) orelse is_pid(Profile) -> ?hcrt("cancel request", [{request_id, RequestId}, {profile, Profile}]), - ok = httpc_manager:cancel_request(RequestId, profile_name(Profile)), - receive - %% If the request was already fulfilled throw away the - %% answer as the request has been canceled. - {http, {RequestId, _}} -> - ok - after 0 -> - ok - end. - + httpc_manager:cancel_request(RequestId, profile_name(Profile)). + %%-------------------------------------------------------------------------- %% set_options(Options) -> ok | {error, Reason} @@ -241,14 +233,7 @@ set_options(Options, Profile) when is_atom(Profile) orelse is_pid(Profile) -> ?hcrt("set options", [{options, Options}, {profile, Profile}]), case validate_options(Options) of {ok, Opts} -> - try - begin - httpc_manager:set_options(Opts, profile_name(Profile)) - end - catch - exit:{noproc, _} -> - {error, inets_not_started} - end; + httpc_manager:set_options(Opts, profile_name(Profile)); {error, Reason} -> {error, Reason} end. @@ -343,8 +328,6 @@ store_cookies(SetCookieHeaders, Url, Profile) ok end catch - exit:{noproc, _} -> - {error, {not_started, Profile}}; error:{badmatch, Bad} -> {error, {parse_failed, Bad}} end. |