From 68c428545dfa01d42e9f665bd6e9dcb647f31e4d Mon Sep 17 00:00:00 2001 From: James Allen Date: Wed, 19 Nov 2014 11:16:43 +0000 Subject: [PATCH] Don't hash because Henry is hashist! --- libraries/redis-wrapper/index.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/redis-wrapper/index.coffee b/libraries/redis-wrapper/index.coffee index ebf953fa06..07c43e4af4 100644 --- a/libraries/redis-wrapper/index.coffee +++ b/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").createHash("md5").update(Math.random().toString()).digest("hex") + id = require("crypto").randomBytes(16).toString("hex") heartbeatChannel = "heartbeat-#{id}" lastHeartbeat = Date.now()