Skip to content

Commit

Permalink
Apply reviewers suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
Noarkhh committed Aug 28, 2024
1 parent b31ee14 commit e999df6
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions lib/membrane_rtsp/server.ex
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ defmodule Membrane.RTSP.Server do

require Logger

alias Credo.CLI.Options
alias Hex.API.Key
alias __MODULE__.Conn

@type server_option ::
Expand Down Expand Up @@ -75,11 +77,15 @@ defmodule Membrane.RTSP.Server do
end

@doc """
Same as `GenServer.stop/2`
Stops the RTSP server.
## Options
- `timeout` - timeout of the server termination, passed to `GenServer.stop/3`.
"""
@spec stop(pid(), reason :: term(), timeout()) :: :ok
def stop(server, reason \\ :normal, timeout \\ :infinity) do
GenServer.stop(server, reason, timeout)
@spec stop(pid(), timeout: timeout()) :: :ok
def stop(server, opts \\ []) do
timeout = Keyword.get(opts, :timeout, :infinity)
GenServer.stop(server, :normal, timeout)
end

@doc """
Expand Down

0 comments on commit e999df6

Please sign in to comment.