Skip to content

Commit

Permalink
call hackney:body after sync requests
Browse files Browse the repository at this point in the history
  • Loading branch information
drewkerrigan committed Mar 28, 2016
1 parent 2e197e5 commit 3fff5c2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/erl_mesos_http.erl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ close_async_response(ClientRef) ->
{error, {http_response, non_neg_integer(), binary()}}.
handle_sync_response(Response) ->
case Response of
{ok, 202, _Headers, _ClientRef} ->
{ok, 202, _Headers, ClientRef} ->
%% The body is always {ok, <<>>} in this case, but we need to
%% read the body to finish the request in Hackney.
erl_mesos_http:body(ClientRef),
ok;
{ok, Status, _Headers, ClientRef} ->
case erl_mesos_http:body(ClientRef) of
Expand Down

0 comments on commit 3fff5c2

Please sign in to comment.