Skip to content

Commit

Permalink
Merge pull request #153 from shakugan/master
Browse files Browse the repository at this point in the history
fix to calling genserver.reply(:undefined, ....)
  • Loading branch information
cmullaparthi committed Sep 2, 2017
2 parents 5ebdab2 + 5b87ac7 commit c97136c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ibrowse_http_client.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1916,6 +1916,11 @@ format_response_data(Resp_format, Body) ->
Body
end.

%% dont message an unexisting server
%% triggered by :stop or :tcp_closed on an unactive connection
do_reply(State, undefined, undefined, _, _, _Msg) ->
dec_pipeline_counter(State);

do_reply(State, From, undefined, _, Resp_format, {ok, St_code, Headers, Body}) ->
Msg_1 = {ok, St_code, Headers, format_response_data(Resp_format, Body)},
gen_server:reply(From, Msg_1),
Expand Down

0 comments on commit c97136c

Please sign in to comment.