diff options
author | Ingela Anderton Andin <[email protected]> | 2013-09-11 15:56:31 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2014-02-05 10:32:24 +0100 |
commit | b68cc1bd8995e53cec04a37be23bd1709e57bff9 (patch) | |
tree | 10dd96cffa40703817f3bd1a27eb3a3fa151ed57 /lib/inets/src/http_client/httpc.erl | |
parent | 8db1d1d3d38948dd118632b6617b8120299ab4b6 (diff) | |
download | otp-b68cc1bd8995e53cec04a37be23bd1709e57bff9.tar.gz otp-b68cc1bd8995e53cec04a37be23bd1709e57bff9.tar.bz2 otp-b68cc1bd8995e53cec04a37be23bd1709e57bff9.zip |
inets: httpc make httpc_cancel_request/[1,2] asynchronous
Conflicts:
lib/inets/src/http_client/httpc_handler.erl
Diffstat (limited to 'lib/inets/src/http_client/httpc.erl')
-rw-r--r-- | lib/inets/src/http_client/httpc.erl | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/inets/src/http_client/httpc.erl b/lib/inets/src/http_client/httpc.erl index 6cb66cc94d..b1bac55871 100644 --- a/lib/inets/src/http_client/httpc.erl +++ b/lib/inets/src/http_client/httpc.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009-2012. All Rights Reserved. +%% Copyright Ericsson AB 2009-2014. 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 @@ -208,15 +208,7 @@ 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)). %%-------------------------------------------------------------------------- |