diff options
author | Ingela Anderton Andin <[email protected]> | 2013-09-11 15:56:31 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2013-09-13 15:14:06 +0200 |
commit | 7d8397a7c9abdee42a1da57ba6b1bbc4b9f6a5c3 (patch) | |
tree | c217dc3496f20d1df107c8029a418a9c526d5aa7 /lib/inets/src/http_client/httpc.erl | |
parent | 89f541f6f9d4b90155c2a3b5e81194327810f693 (diff) | |
download | otp-7d8397a7c9abdee42a1da57ba6b1bbc4b9f6a5c3.tar.gz otp-7d8397a7c9abdee42a1da57ba6b1bbc4b9f6a5c3.tar.bz2 otp-7d8397a7c9abdee42a1da57ba6b1bbc4b9f6a5c3.zip |
inets: httpc make httpc_cancel_request/[1,2] asynchronous
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 4d7023a8e9..151539f52f 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} |