File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ as WebRTC multiplexes traffic on a single socket but PRs are welcomed
27
27
``` elixir
28
28
def deps do
29
29
[
30
- {:ex_ice , " ~> 0.3 .0" }
30
+ {:ex_ice , " ~> 0.4 .0" }
31
31
]
32
32
end
33
33
```
Original file line number Diff line number Diff line change @@ -217,6 +217,14 @@ defmodule ExICE.ICEAgent do
217
217
GenServer . cast ( ice_agent , :restart )
218
218
end
219
219
220
+ @ doc """
221
+ Stops ICE agent and all of its sockets.
222
+ """
223
+ @ spec stop ( pid ( ) ) :: :ok
224
+ def stop ( ice_agent ) do
225
+ GenServer . stop ( ice_agent )
226
+ end
227
+
220
228
### Server
221
229
222
230
@ impl true
@@ -588,6 +596,12 @@ defmodule ExICE.ICEAgent do
588
596
{ :noreply , state }
589
597
end
590
598
599
+ @ impl true
600
+ def terminate ( reason , _state ) do
601
+ # we don't need to close sockets manually as this is done automatically by Erlang
602
+ Logger . debug ( "Stopping ICE agent with reason: #{ inspect ( reason ) } " )
603
+ end
604
+
591
605
defp do_add_remote_candidate ( remote_cand , state ) do
592
606
local_cands = get_matching_candidates ( state . local_cands , remote_cand )
593
607
Original file line number Diff line number Diff line change 1
1
defmodule ExICE.MixProject do
2
2
use Mix.Project
3
3
4
- @ version "0.3 .0"
4
+ @ version "0.4 .0"
5
5
@ source_url "https://github.com/elixir-webrtc/ex_ice"
6
6
7
7
def project do
You can’t perform that action at this time.
0 commit comments