mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 01:40:24 +00:00
Built from base
This commit is contained in:
@@ -54,14 +54,16 @@ function startClustered(redis_enabled) {
|
||||
//console.log(ip);
|
||||
var s = "";
|
||||
console.log("this is some ip shit", ip);
|
||||
if (ip == undefined) ip = uniqid.time();
|
||||
if (ip !== undefined) {
|
||||
return farmhash.fingerprint32(ip) % len;
|
||||
}
|
||||
ip = uniqid.time();
|
||||
for (var i = 0, _len = ip.length; i < _len; i++) {
|
||||
if (!isNaN(ip[i])) {
|
||||
s += ip[i];
|
||||
}
|
||||
}
|
||||
return Number(s) % len;
|
||||
//return farmhash.fingerprint32(ip) % len;
|
||||
};
|
||||
|
||||
var server = net
|
||||
|
||||
Reference in New Issue
Block a user