Преглед изворни кода

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

James Allen пре 12 година
родитељ
комит
e988dc8586
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      libraries/redis-wrapper/index.coffee

+ 1 - 1
libraries/redis-wrapper/index.coffee

@@ -27,7 +27,7 @@ module.exports = RedisSharelatex =
 		heartbeatInterval = heartbeatOpts.heartbeat_interval or 1000 #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}"
 		lastHeartbeat = Date.now()