Skip to content

Commit

Permalink
Merge pull request #96 from buddhikajay/env_variables
Browse files Browse the repository at this point in the history
Parse TurnServerExpiery Parameter Before Concatenating
  • Loading branch information
fippo committed May 8, 2017
2 parents e98d388 + 0f0bf76 commit 919604c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sockets.js
Expand Up @@ -111,7 +111,7 @@ module.exports = function (server, config) {
config.turnservers.forEach(function (server) {
var hmac = crypto.createHmac('sha1', server.secret);
// default to 86400 seconds timeout unless specified
var username = Math.floor(new Date().getTime() / 1000) + (server.expiry || 86400) + "";
var username = Math.floor(new Date().getTime() / 1000) + (parseInt(server.expiry, 10) || 86400) + "";
hmac.update(username);
credentials.push({
username: username,
Expand Down

0 comments on commit 919604c

Please sign in to comment.