Skip to content

Commit 7233d20

Browse files
committed
fix compatibility with OTP 21
1 parent 8bca78c commit 7233d20

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/hackney_stream.erl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,8 @@ init(Parent, Owner, Ref, Client) ->
3030
try
3131
stream_loop(Parent, Owner, Ref, Client#client{parser=Parser,
3232
response_state=on_status})
33-
catch Class:Reason ->
34-
Owner ! {hackney_response, Ref, {error, {unknown_error,
35-
{{Class, Reason,
36-
erlang:get_stacktrace()},
37-
"An unexpected error occurred."}}}}
33+
catch _:Reason ->
34+
Owner ! {hackney_response, Ref, {error, {unknown_error, Reason}}}
3835
end.
3936

4037
wait_for_controlling_process() ->

0 commit comments

Comments
 (0)