Skip to content

Commit 9224ab7

Browse files
authored
Call end_of_candidates on receiving an empty ICE candidate (#68)
1 parent 4095ede commit 9224ab7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/ex_webrtc/peer_connection.ex

+6
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,12 @@ defmodule ExWebRTC.PeerConnection do
391391
{:reply, {:error, :no_remote_description}, state}
392392
end
393393

394+
@impl true
395+
def handle_call({:add_ice_candidate, %{candidate: ""}}, _from, state) do
396+
:ok = state.ice_transport.end_of_candidates(state.ice_pid)
397+
{:reply, :ok, state}
398+
end
399+
394400
@impl true
395401
def handle_call({:add_ice_candidate, candidate}, _from, state) do
396402
with "candidate:" <> attr <- candidate.candidate do

0 commit comments

Comments
 (0)