Skip to content

Commit

Permalink
move connection declaration. cc @ericz
Browse files Browse the repository at this point in the history
  • Loading branch information
michelle-stripe committed Oct 8, 2014
1 parent 9ed9aa8 commit 1a4cea3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/peer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 1a4cea3

Please sign in to comment.