@@ -357,7 +357,7 @@ defmodule ExICE.Priv.ICEAgent do
357357 end
358358
359359 def add_remote_candidate ( ice_agent , remote_cand ) do
360- Logger . debug ( "New remote candidate: #{ inspect ( remote_cand ) } " )
360+ Logger . debug ( "Trying to add a new remote candidate: #{ inspect ( remote_cand ) } " )
361361
362362 uniq? = fn remote_cands , remote_cand ->
363363 not Enum . any? ( remote_cands , fn cand ->
@@ -774,19 +774,21 @@ defmodule ExICE.Priv.ICEAgent do
774774
775775 true ->
776776 with remote_cands <- Map . values ( ice_agent . remote_cands ) ,
777- % _ { } = local_cand <- find_host_cand ( Map . values ( ice_agent . local_cands ) , socket ) ,
778- % _ { } = remote_cand <- find_remote_cand ( remote_cands , src_ip , src_port ) do
777+ { :host , % _ { } = local_cand } <-
778+ { :host , find_host_cand ( Map . values ( ice_agent . local_cands ) , socket ) } ,
779+ { :remote , % _ { } = remote_cand } <-
780+ { :remote , find_remote_cand ( remote_cands , src_ip , src_port ) } do
779781 % CandidatePair { } =
780782 pair = Checklist . find_pair ( ice_agent . checklist , local_cand . base . id , remote_cand . id )
781783
782784 handle_data_message ( ice_agent , pair , packet )
783785 else
784- _ ->
786+ { type , _ } ->
785787 Logger . debug ( """
786- Couldn't find host or remote candidate for:
788+ Couldn't find #{ type } candidate for:
787789 socket: #{ inspect ( socket ) }
788- src address: #{ inspect ( { src_ip , src_port } ) } .
789- Ignoring incoming data message.
790+ src address: #{ inspect ( { src_ip , src_port } ) } .
791+ And this is not a STUN message. Ignoring .
790792 """ )
791793
792794 ice_agent
0 commit comments