From 2f45633312839fcc2a2eb6461d94ab083327103f Mon Sep 17 00:00:00 2001 From: Robert Swain Date: Wed, 19 Apr 2017 16:42:58 +0200 Subject: [PATCH] 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. --- src/webrtc/call.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webrtc/call.js b/src/webrtc/call.js index 2e6a80a1e..d35622079 100644 --- a/src/webrtc/call.js +++ b/src/webrtc/call.js @@ -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;