mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Replaced unsupported randomint()
This commit is contained in:
parent
5981ce73dc
commit
f93e71dada
3 changed files with 4 additions and 4 deletions
|
@ -172,7 +172,7 @@ module.exports.CreateMultiServer = function (parent, args) {
|
|||
|
||||
// Get the next retry time in milliseconds
|
||||
function getConnectRetryTime() {
|
||||
if (obj.retryBackoff < 30000) { obj.retryBackoff += require('crypto').randomInt(1000, 4000); }
|
||||
if (obj.retryBackoff < 30000) { obj.retryBackoff += ((require('crypto').randomBytes(4).readUInt32BE(0) % 3000) + 1000); }
|
||||
return obj.retryBackoff;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue