1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

webrtc/call: Make it much less likely that callIds collide locally

Previously if two calls were constructed within 1ms they could have the
same id.
This commit is contained in:
Robert Swain
2017-04-19 16:42:58 +02:00
parent 54a6f5d425
commit 2f45633312

View File

@@ -91,7 +91,7 @@ function MatrixCall(opts) {
utils.checkObjectHasKeys(server, ["urls"]);
});
this.callId = "c" + new Date().getTime();
this.callId = "c" + new Date().getTime() + Math.random();
this.state = 'fledgling';
this.didConnect = false;