Skip to content

Commit

Permalink
make sure to not receive any msg from the socketwhen returing in loop
Browse files Browse the repository at this point in the history
should fix #464
  • Loading branch information
benoitc committed Feb 27, 2018
1 parent 07e4a35 commit c3940a8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/hackney_stream.erl
Expand Up @@ -262,6 +262,7 @@ async_recv(Parent, Owner, Ref,
Transport:controlling_process(TSock, From),
From ! {Ref, ok};
{OK, Sock, Data} ->
Transport:setopts(TSock, [{active, false}]),
stream_loop(Parent, Owner, Ref, Client#client{buffer=Data});
{Closed, Sock} ->
case Client#client.response_state of
Expand Down

0 comments on commit c3940a8

Please sign in to comment.