Skip to content

Commit 17dbe8e

Browse files
authored
Add timeout parameter to ICEAgent.get_stats/2 (#108)
* Add timeout parameter to ICEAgent.get_stats/2 * Release 0.16.1
1 parent 4049deb commit 17dbe8e

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/ex_ice/ice_agent.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ defmodule ExICE.ICEAgent do
276276
* `packets_received` - data packets received. This does not include connectivity checks.
277277
* `candidate_pairs` - list of current candidate pairs. Changes after doing an ICE restart.
278278
"""
279-
@spec get_stats(pid()) :: %{
279+
@spec get_stats(pid(), timeout()) :: %{
280280
bytes_sent: non_neg_integer(),
281281
bytes_received: non_neg_integer(),
282282
packets_sent: non_neg_integer(),
@@ -288,8 +288,8 @@ defmodule ExICE.ICEAgent do
288288
remote_candidates: [Candidate.t()],
289289
candidate_pairs: [CandidatePair.t()]
290290
}
291-
def get_stats(ice_agent) do
292-
GenServer.call(ice_agent, :get_stats)
291+
def get_stats(ice_agent, timeout \\ 5000) do
292+
GenServer.call(ice_agent, :get_stats, timeout)
293293
end
294294

295295
@doc """

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
defmodule ExICE.MixProject do
22
use Mix.Project
33

4-
@version "0.16.0"
4+
@version "0.16.1"
55
@source_url "https://github.com/elixir-webrtc/ex_ice"
66

77
def project do

0 commit comments

Comments
 (0)