aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/http_client
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2016-09-19 15:12:43 +0200
committerIngela Anderton Andin <[email protected]>2016-09-19 15:12:43 +0200
commit303047140c0fcb3a0b01ecbffa3fe89dbbcd6806 (patch)
treeca15e0300a9c4d2c5dc3d31da1758ba891579c05 /lib/inets/src/http_client
parent548a59177c1a5eb2a73cbf7d57f988326b05f8a6 (diff)
downloadotp-303047140c0fcb3a0b01ecbffa3fe89dbbcd6806.tar.gz
otp-303047140c0fcb3a0b01ecbffa3fe89dbbcd6806.tar.bz2
otp-303047140c0fcb3a0b01ecbffa3fe89dbbcd6806.zip
inets: httpc improve error handling
Handler process should exit normal if manager process has been terminated
Diffstat (limited to 'lib/inets/src/http_client')
-rw-r--r--lib/inets/src/http_client/httpc_handler.erl7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/inets/src/http_client/httpc_handler.erl b/lib/inets/src/http_client/httpc_handler.erl
index d1c52dcc78..5d3993cb36 100644
--- a/lib/inets/src/http_client/httpc_handler.erl
+++ b/lib/inets/src/http_client/httpc_handler.erl
@@ -1887,10 +1887,13 @@ update_session(ProfileName, #session{id = SessionId} = Session, Pos, Value) ->
httpc_manager:update_session(ProfileName, SessionId, Pos, Value)
end
catch
- error:undef -> % This could happen during code upgrade
+ error:undef -> %% This could happen during code upgrade
Session2 = erlang:setelement(Pos, Session, Value),
insert_session(Session2, ProfileName);
- T:E ->
+ error:badarg ->
+ exit(normal); %% Manager has been shutdown
+ T:E ->
+ %% Unexpected this must be an error!
Stacktrace = erlang:get_stacktrace(),
error_logger:error_msg("Failed updating session: "
"~n ProfileName: ~p"