|
@@ -174,6 +174,7 @@ Peer.prototype._handleMessage = function(message) {
|
|
|
var type = message.type;
|
|
|
var payload = message.payload;
|
|
|
var peer = message.src;
|
|
|
+ var connection;
|
|
|
|
|
|
switch (type) {
|
|
|
case 'OPEN': // The connection to the server is open.
|
|
@@ -201,7 +202,7 @@ Peer.prototype._handleMessage = function(message) {
|
|
|
break;
|
|
|
case 'OFFER': // we should consider switching this to CALL/CONNECT, but this is the least breaking option.
|
|
|
var connectionId = payload.connectionId;
|
|
|
- var connection = this.getConnection(peer, connectionId);
|
|
|
+ connection = this.getConnection(peer, connectionId);
|
|
|
|
|
|
if (connection) {
|
|
|
util.warn('Offer received for existing Connection ID:', connectionId);
|