Added changes to stop auth attempts after an error

pull/3234/head
Kenneth Foster 2 years ago
parent 9d71e34a83
commit f68452c47a

@ -413,12 +413,14 @@ exports.radius = function (
exports.redisPingAsync = function (dsn) {
return new Promise((resolve, reject) => {
const client = redis.createClient({
url: dsn,
url: dsn
});
client.on("error", (err) => {
client.disconnect();
reject(err);
});
client.connect().then(() => {
if(client.isOpen){
client.ping().then((res, err) => {
if (client.isOpen) {
client.disconnect();
@ -429,6 +431,7 @@ exports.redisPingAsync = function (dsn) {
resolve(res);
}
});
}
});
});
};

Loading…
Cancel
Save