Skip to content

Commit 3e4e49d

Browse files
rciorbabenoitc
authored andcommitted
correct the spec for stop_async/1 (#561)
1 parent 7004bb3 commit 3e4e49d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

doc/hackney.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ and headers of the response. and return
588588
### stop_async/1 ###
589589

590590
<pre><code>
591-
stop_async(Ref::<a href="#type-client_ref">client_ref()</a>) -&gt; ok | {error, req_not_found} | {error, term()}
591+
stop_async(Ref::<a href="#type-client_ref">client_ref()</a>) -&gt; {ok, <a href="#type-client_ref">client_ref()</a>} | {error, req_not_found} | {error, term()}
592592
</code></pre>
593593
<br />
594594

src/hackney.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ resume_stream(Ref) ->
554554
end).
555555

556556
%% @doc stop to receive asynchronously.
557-
-spec stop_async(client_ref()) -> ok | {error, req_not_found} | {error, term()}.
557+
-spec stop_async(client_ref()) -> {ok, client_ref()} | {error, req_not_found} | {error, term()}.
558558
stop_async(Ref) ->
559559
hackney_manager:stop_async_response(Ref).
560560

0 commit comments

Comments
 (0)