Skip to content
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

Missing destruction sequence for ice agent. #669

Closed
jan-ivar opened this issue May 25, 2016 · 3 comments
Closed

Missing destruction sequence for ice agent. #669

jan-ivar opened this issue May 25, 2016 · 3 comments
Assignees

Comments

@jan-ivar
Copy link
Member

pc.close says this about the ICE agent:

  • Destroy connection's ICE Agent, abruptly ending any active ICE processing and any active streaming, and releasing any relevant resources (e.g. TURN permissions).

and that is all it says. It needs to update the ICE connection state to "closed", but do so synchronously, and without firing any events.

Except there's more to this, because said "closed" state says: "All of the RTCIceTransports are in the closed state." which implies a shutdown-sequence's worth of underlying RTCIceTransports states in need of changing. In other words:

  1. sender.transport.state
  2. sender.transport.transport.state (not a typo!)
  3. sender.rtcpTansport.state
  4. sender.rtcpTransport.transport.state
  5. receiver.transport.state
  6. receiver.transport.transport.state
  7. receiver.rtcpTansport.state
  8. receiver.rtcpTransport.transport.state

all need to become "closed" at this point, I think, for each sender and receiver from pc.getSenders() and pc.getReceivers() respectively.

@alvestrand
Copy link
Contributor

Comment: In the normal case (BUNDLE), all those transports are one and the same.

aboba added a commit that referenced this issue Jun 21, 2016
Work in progress (do not merge).

Fix for Issue #669
@aboba
Copy link
Contributor

aboba commented Jun 22, 2016

Once all the RTCIceTransport objects have their RTCIceTransport.state set to "closed", the ICE connection state will automatically be updated to "closed" (since it is computed from the state of the RTCIceTransport objects). So this will happen automatically.

@alvestrand
Copy link
Contributor

Fixed by #713

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants