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

ICE Agent can not be restarted when gathering #280

Closed
jech opened this issue Aug 13, 2020 · 4 comments · Fixed by #328
Closed

ICE Agent can not be restarted when gathering #280

jech opened this issue Aug 13, 2020 · 4 comments · Fixed by #328
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@jech
Copy link
Member

jech commented Aug 13, 2020

In recent versions of the Unnamed SFU, the client will restart ICE whenever the connection's ICE state goes into failed. I'm occasionally getting the following error:

ICE Agent can not be restarted when gathering

It happens somewhere in the code that handles incoming offers; I'd need to add more detailed logging in order to know which exact function triggers the error. How do I avoid this problem?

@Sean-Der
Copy link
Member

@jech This is really just a deficiency of Pion/ice! I don’t think it is terribly hard to fix either.

I think it will just take a careful design concurrency wise.

Before that improvement lands you can just not allow a restart until the nil candidate has been emitted.

@jech
Copy link
Member Author

jech commented Sep 3, 2020

I've implemented a workaround (different than the one you suggest), so this is no longer urgent.

@tarrencev tarrencev transferred this issue from pion/webrtc Sep 16, 2020
@tarrencev tarrencev added bug Something isn't working help wanted Extra attention is needed labels Sep 16, 2020
@wawesomeNOGUI
Copy link
Member

How the ICE Restart Should Work:

Right now the Restart method in agent.go attempts to restart ICE gathering, but if that agent's gatheringstate == GatheringStateGathering, the Restart method returns.

Instead, the Restart method should cancel the gathering processes running in gather.go by running a.gatherCandidateCancle() like here in gather.go,
and then proceed to restart the gathering process.

Let me know if that sounds good!

@jech
Copy link
Member Author

jech commented Aug 1, 2021

@Sean-Der what happend to that pull request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Development

Successfully merging a pull request may close this issue.

4 participants