Skip to content

Commit d9bf764

Browse files
committed
Requested changes
1 parent 3010266 commit d9bf764

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

lib/ex_ice/priv/ice_agent.ex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1744,6 +1744,7 @@ defmodule ExICE.Priv.ICEAgent do
17441744
conn_check_pair = %CandidatePair{
17451745
conn_check_pair
17461746
| state: :failed,
1747+
valid?: false,
17471748
non_symmetric_responses_received: conn_check_pair.non_symmetric_responses_received + 1
17481749
}
17491750

@@ -1817,6 +1818,7 @@ defmodule ExICE.Priv.ICEAgent do
18171818
conn_check_pair = %CandidatePair{
18181819
conn_check_pair
18191820
| state: :failed,
1821+
valid?: false,
18201822
responses_received: conn_check_pair.responses_received + 1
18211823
}
18221824

@@ -3014,7 +3016,8 @@ defmodule ExICE.Priv.ICEAgent do
30143016
pair
30153017
| packets_discarded_on_send: pair.packets_discarded_on_send + 1,
30163018
bytes_discarded_on_send: pair.bytes_discarded_on_send + byte_size(raw_req),
3017-
state: :failed
3019+
state: :failed,
3020+
valid?: false
30183021
}
30193022

30203023
put_in(ice_agent.checklist[pair.id], pair)

test/priv/ice_agent_test.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1566,9 +1566,9 @@ defmodule ExICE.Priv.ICEAgentTest do
15661566
assert ice_agent.state == :completed
15671567
end
15681568

1569-
test "candidate fails to send conn check" do
1569+
test "failure on send" do
15701570
# 1. replace candidate with the mock one that always fails to send data
1571-
# 2. assert that after unsuccessful conn check sending, ice_agent move conn pair to the failed state
1571+
# 2. assert that after unsuccessful conn check sending, ice_agent moves conn pair to the failed state
15721572

15731573
ice_agent =
15741574
ICEAgent.new(

0 commit comments

Comments
 (0)