Skip to content
Snippets Groups Projects
Commit 6cc944f2 authored by Cecylia Bocovich's avatar Cecylia Bocovich
Browse files

Reuse proxypair if sendAnswer fails

Make sure to set proxypair.active to false if createAnswer or
setLocalDescription fails. This should prevent one edge case the results
in an infinite loop described in ticket #31100.
parent 990047b2
No related branches found
Tags webext-0.0.6
No related merge requests found
......@@ -120,10 +120,11 @@ class Snowflake {
var fail, next;
next = function(sdp) {
dbg('webrtc: Answer ready.');
return pair.pc.setLocalDescription(sdp);
return pair.pc.setLocalDescription(sdp).catch(fail);
};
fail = function() {
return dbg('webrtc: Failed to create Answer');
pair.active = false
return dbg('webrtc: Failed to create or set Answer');
};
return pair.pc.createAnswer().then(next).catch(fail);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment