-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Skip ice candidate if peer and stream objects are NULL #1534
Conversation
Call setRemoteCandidates twice to test using of start_future_ in 2 cases: first time and next times.
Tests passed only when I allow using peer_ variable only after startSync() has been done (synced by start_promise_). |
erizo/src/erizo/NicerConnection.cpp
Outdated
@@ -320,6 +320,16 @@ void NicerConnection::startGathering() { | |||
} | |||
|
|||
bool NicerConnection::setRemoteCandidates(const std::vector<CandidateInfo> &candidates, bool is_bundle) { | |||
// At this moment we should have peer_ initalized. To make sure, we are waiting for start_promise_ there |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we make sure we don't call setRemoteCandidates before having started Nicer? I don't like the idea of blocking the thread while we are waiting. Another alternative is to return false and call setRemoteCandidates after a while again.
…chak/licode into vpoddubchak-fix/nicer_crash_with_ios
Merge with master branch and fix unit tests without locking threads
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks good, thanks for the contribution @vpoddubchak
This PR is a workaround of crash which sometimes happens when iOS client tries to connect to the room. In some cases peer and stream objects are NULL (possible because of race condition) in moment then method nicer->IcePeerContextParseTrickleCandidate is calling.
In cases when skipped ice-candidate is host - all will be OK: connection will be established. But I'm afraid that in cases when we skip srflx candidate it can bring to connection problems. Anyway it is better than crash of the room...