aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorZandra Hird <[email protected]>2015-07-31 08:50:01 +0200
committerZandra Hird <[email protected]>2015-07-31 08:50:01 +0200
commit1bc032259f571f3c7c00aad8ee1b93fb452f2d40 (patch)
treecc7d23e9840b44807ceb538d485082d8f7bdacd7 /lib
parent73e0f805ff76e768dba639fab79016fdcb6f8cf7 (diff)
parent98647fcc1632f60871adee20031e294e5d5b6eb0 (diff)
downloadotp-1bc032259f571f3c7c00aad8ee1b93fb452f2d40.tar.gz
otp-1bc032259f571f3c7c00aad8ee1b93fb452f2d40.tar.bz2
otp-1bc032259f571f3c7c00aad8ee1b93fb452f2d40.zip
Merge branch 'maint'
* maint: inets: cancel for handler with no requests
Diffstat (limited to 'lib')
-rw-r--r--lib/inets/src/http_client/httpc_handler.erl10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/inets/src/http_client/httpc_handler.erl b/lib/inets/src/http_client/httpc_handler.erl
index 3f979de078..205348524a 100644
--- a/lib/inets/src/http_client/httpc_handler.erl
+++ b/lib/inets/src/http_client/httpc_handler.erl
@@ -421,6 +421,16 @@ handle_cast({cancel, RequestId},
{profile, ProfileName},
{canceled, Canceled}]),
{noreply, State#state{canceled = [RequestId | Canceled]}};
+handle_cast({cancel, RequestId},
+ #state{profile_name = ProfileName,
+ request = undefined,
+ canceled = Canceled} = State) ->
+ ?hcrv("cancel", [{request_id, RequestId},
+ {curr_req_id, undefined},
+ {profile, ProfileName},
+ {canceled, Canceled}]),
+ {noreply, State};
+
handle_cast(stream_next, #state{session = Session} = State) ->
activate_once(Session),