From 1b9ffdb56a1ef6c48d037cfcd3ea2dfe21bdbdff Mon Sep 17 00:00:00 2001 From: benoitc Date: Fri, 21 Aug 2015 11:39:02 +0200 Subject: [PATCH] use transport socket to close it forgot that while fixing #223 --- src/hackney_client/hackney_stream.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hackney_client/hackney_stream.erl b/src/hackney_client/hackney_stream.erl index fde873f3..f19e8bea 100644 --- a/src/hackney_client/hackney_stream.erl +++ b/src/hackney_client/hackney_stream.erl @@ -241,7 +241,7 @@ async_recv(Parent, Owner, Ref, proc_lib:hibernate(?MODULE, async_recv, [Parent, Owner, Ref, Client, Buffer]); {Ref, close} -> - Transport:close(Sock); + Transport:close(TSock); {Ref, stop_async, From} -> hackney_manager:store_state(Client#client{async=false}), Transport:setopts(TSock, [{active, false}]),