Skip to content

Commit

Permalink
adding trace addon, testing code to avoid undefined sids
Browse files Browse the repository at this point in the history
  • Loading branch information
btouellette committed Oct 7, 2016
1 parent eb976ca commit 5fe81d7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/gameserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ module.exports = function(server, sessionStore) {
next(new Error('Error parsing session cookie'));
}
} else {
next(new Error('No cookie transmitted'));
if(handshakeData.query['sid']) {
handshakeData.sessionID = handshakeData.query['sid'];
} else {
next(new Error('No cookie and no parameter transmitted'));
}
}
next();
});
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "concarneau",
"main": "server.js",
"dependencies": {
"@risingstack/trace": "^2.23.4",
"bcrypt-nodejs": "latest",
"body-parser": "~1.4.3",
"compression": "~1.0.8",
Expand Down
3 changes: 3 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ if(process.env.NODETIME_ACCOUNT_KEY) {
appName: 'Concarneau'
});
}
if(process.env.TRACE_SERVICE_NAME) {
require('@risingstack/trace');
}

var port = process.env.PORT || 8080;

Expand Down

0 comments on commit 5fe81d7

Please sign in to comment.