Skip to content

Commit

Permalink
check session before referencing it
Browse files Browse the repository at this point in the history
  • Loading branch information
quartzjer committed Jan 26, 2015
1 parent f4d77e7 commit 8c5222d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mesh.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ exports.mesh = function(args, cbMesh)
if(atNew >= atOld) link.addPipe(pipe, true);

// if the senders token changed, we need to reset
if(link.sid != link.x.session.token.toString('hex'))
if(link.x.session && link.sid != link.x.session.token.toString('hex'))
{
link.sid = link.x.session.token.toString('hex');
log.debug('new session',link.sid);
Expand Down

0 comments on commit 8c5222d

Please sign in to comment.