Skip to content

Add close/1 #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add close/1 #81

wants to merge 1 commit into from

Conversation

mickel8
Copy link
Member

@mickel8 mickel8 commented Jun 6, 2025

Add close/1 function.

This function irreversibly closes ICE agent but does not terminate its process. Later calls to getters (e.g. get_stats/1) are still allowed but the agent can no longer be used to establish a connection.

NOTE The best solution would be to modify ICE agent API to be similar to Erlang's :gen_udp API where, after closing a socket, :gen_udp functions return {:error, :closed} tuple. This however, would require a lot of changes. Other incorrect actions e.g. setting remote credentials in a wrong state, are also ignored i.e. no error is returned. If we find this problematic, we will modify ICE agent API in the future.

Related to: elixir-webrtc/ex_webrtc#218

@mickel8 mickel8 force-pushed the close branch 3 times, most recently from 981e9a0 to 7d09c8a Compare June 9, 2025 13:40
Copy link

codecov bot commented Jun 9, 2025

Codecov Report

Attention: Patch coverage is 58.13953% with 18 lines in your changes missing coverage. Please review.

Project coverage is 84.75%. Comparing base (7552d06) to head (c13e5ad).

Files with missing lines Patch % Lines
lib/ex_ice/priv/ice_agent.ex 55.00% 18 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #81      +/-   ##
==========================================
+ Coverage   83.88%   84.75%   +0.87%     
==========================================
  Files          25       25              
  Lines        1837     1870      +33     
==========================================
+ Hits         1541     1585      +44     
+ Misses        296      285      -11     
Files with missing lines Coverage Δ
lib/ex_ice/ice_agent.ex 65.75% <100.00%> (+4.32%) ⬆️
lib/ex_ice/priv/ice_agent.ex 85.92% <55.00%> (-0.16%) ⬇️

... and 2 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 7552d06...c13e5ad. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant