Skip to content

Commit 96e881e

Browse files
committed
fix stream_body timeout issue by reverting breaking error format change
Revert the error format change from {error, Reason} to {error, {Reason, Buffer}} in stream_body_recv_error. This breaking change was causing stream_body to hang after the first chunk as reported in issue #762. The original error format must be preserved for compatibility with existing error handling code that expects {error, timeout} rather than {error, {timeout, Buffer}}.
1 parent 431b4f5 commit 96e881e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hackney_response.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ stream_body_recv_error(Reason, Buffer, Client=#client{version=Version, clen=CLen
196196
closed ->
197197
{error, {closed, Buffer}};
198198
_Else ->
199-
{error, {Reason, Buffer}}
199+
{error, Reason}
200200
end.
201201

202202

0 commit comments

Comments
 (0)