diff --git a/manual/cowboy.md b/manual/cowboy.md index c2ef8597..0eab0f8e 100644 --- a/manual/cowboy.md +++ b/manual/cowboy.md @@ -76,7 +76,7 @@ Exports > Start listening for SPDY connections. Returns the pid for this > listener's supervisor. -### stop_listener(Ref) -> ok +### stop_listener(Ref) -> ok | {error, not_found} > Types: > * Ref = ranch:ref() diff --git a/src/cowboy.erl b/src/cowboy.erl index 610a33a1..3e838d19 100644 --- a/src/cowboy.erl +++ b/src/cowboy.erl @@ -67,7 +67,7 @@ start_spdy(Ref, NbAcceptors, TransOpts, ProtoOpts) ranch_ssl, TransOpts2, cowboy_spdy, ProtoOpts). %% @doc Stop a listener. --spec stop_listener(ranch:ref()) -> ok. +-spec stop_listener(ranch:ref()) -> ok | {error, not_found}. stop_listener(Ref) -> ranch:stop_listener(Ref).