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

fix: do ECClient disconnect in RTCIceConnectionStateClosed only to prevent crash. #75

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

Conversation

allenlinli
Copy link
Contributor

@allenlinli allenlinli commented May 30, 2018

I found a bug that it crashes when I disconnect a room.
The bug is described in the issue I sent earlier: #74

I found the reason it crashes is that a block inside ECClient is being released when the ECClient is released(while ECRoom's publishingStatsTimer released, and so that ECRoom and ECClient are released).

So I move the disconnect to RTCIceConnectionStateClosed to prevent this crash.

And after I read the references addressed in this issue (#73), I still didn't find the answer that should both RTCIceConnectionStateDisconnected and RTCIceConnectionStateClosed do disconnect. Since disconnect deallocates ECRoom, and it "probably" always calls RTCIceConnectionStateClosed, we could safely call disconnect at RTCIceConnectionStateClosed.

@allenlinli
Copy link
Contributor Author

And so far I couldn't reproduce the crash on your sample code yet.
And also I didn't build WebRTC to get the debug symbol see the backtrace (although I guess it's irrelevant). I will try it later.

@zevarito
Copy link
Owner

zevarito commented Jun 1, 2018

thanks @allenlinli! I'll hope to be back on this project next week and review/test all these.

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.

2 participants