From f0a28d485f3d156f4f01f76e4a969cc594e6dcab Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Fri, 31 Jul 2020 03:01:54 +1200 Subject: [PATCH] Remove debugging info from getIdentifier --- src/lib/quota/get_identifier.js | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/src/lib/quota/get_identifier.js b/src/lib/quota/get_identifier.js index a1ed566..c091ba2 100644 --- a/src/lib/quota/get_identifier.js +++ b/src/lib/quota/get_identifier.js @@ -33,21 +33,16 @@ if (constants.quota.enabled) { } function getIdentifier(address) { - let d = Date.now() - const result = (() => { - try { - if (address == undefined) return "missing" - else if (checker(address)) return "proxy" - else if (addressSet.has(address)) return "proxy" - else return address - } catch (e) { - // not a valid IP address, or some error like that - console.error(e) - throw e - } - })() - console.log(`identified ${address} -> ${result} in ${Date.now()-d} ms`) - return result + try { + if (address == undefined) return "missing" + else if (checker(address)) return "proxy" + else if (addressSet.has(address)) return "proxy" + else return address + } catch (e) { + // not a valid IP address, or some error like that + console.error(e) + throw e + } } module.exports.getIdentifier = getIdentifier