Don't need secure random bytes which can error if not enough entropy

This commit is contained in:
James Allen 2014-11-19 11:18:31 +00:00
parent 68c428545d
commit e988dc8586

View file

@ -27,7 +27,7 @@ module.exports = RedisSharelatex =
heartbeatInterval = heartbeatOpts.heartbeat_interval or 1000 #ms heartbeatInterval = heartbeatOpts.heartbeat_interval or 1000 #ms
reconnectAfter = heartbeatOpts.reconnect_after or 5000 #ms reconnectAfter = heartbeatOpts.reconnect_after or 5000 #ms
id = require("crypto").randomBytes(16).toString("hex") id = require("crypto").pseudoRandomBytes(16).toString("hex")
heartbeatChannel = "heartbeat-#{id}" heartbeatChannel = "heartbeat-#{id}"
lastHeartbeat = Date.now() lastHeartbeat = Date.now()