Skip to content

Conversation

@mickel8
Copy link
Contributor

@mickel8 mickel8 commented Jul 25, 2024

This PR:

  • cleanup state after moving to the failed state
  • cleanup state after moving to the completed state
  • ensures we ignore all actions except ice restart when the connection is in failed state
  • ensures that we ignore data from stale sockets, timers, etc. e.g. we might move to the failed state at the same time as keepalive timer fires. As a result, we will cleanup internal state at first, and then we will try to handle keepalive. The same with incoming udp data, and other timers.

@mickel8 mickel8 changed the title Ignore data frome stale sockets, timers, etc. Clean up state when connection is failed or completed Clean up state when connection is failed or completed. Ignore data frome stale sockets, timers, etc. Jul 25, 2024
@codecov
Copy link

codecov bot commented Jul 25, 2024

Codecov Report

Attention: Patch coverage is 73.84615% with 17 lines in your changes missing coverage. Please review.

Project coverage is 81.79%. Comparing base (bed3d9c) to head (c4c8133).

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #55      +/-   ##
==========================================
+ Coverage   80.94%   81.79%   +0.85%     
==========================================
  Files          25       25              
  Lines        1443     1483      +40     
==========================================
+ Hits         1168     1213      +45     
+ Misses        275      270       -5     
Files Coverage Δ
lib/ex_ice/priv/conn_check_handler/controlling.ex 96.15% <100.00%> (-0.15%) ⬇️
lib/ex_ice/priv/ice_agent.ex 84.61% <72.58%> (+0.15%) ⬆️

... and 3 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bed3d9c...c4c8133. Read the comment docs.

@mickel8 mickel8 force-pushed the cleanup branch 5 times, most recently from fec9387 to 21436bb Compare July 25, 2024 16:38
@mickel8 mickel8 marked this pull request as ready for review July 25, 2024 16:41
@mickel8 mickel8 mentioned this pull request Jul 25, 2024
63 tasks
Comment on lines +660 to +661
%_{} = local_cand <- find_host_cand(Map.values(ice_agent.local_cands), socket),
%_{} = remote_cand <- find_remote_cand(remote_cands, src_ip, src_port) do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find this syntax a bit confusing, consider using local_cand when is_struct(local_cand) <- ...

@mickel8 mickel8 merged commit 852c73a into master Jul 26, 2024
@mickel8 mickel8 deleted the cleanup branch July 26, 2024 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants