mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Don't need secure random bytes which can error if not enough entropy
This commit is contained in:
parent
68c428545d
commit
e988dc8586
1 changed files with 1 additions and 1 deletions
|
@ -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()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue